Created
August 11, 2021 15:45
-
-
Save abdiasriver/a04f7e9796ffa0f3519fff89f08231bb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" dir="ltr"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
</head> | |
<body> | |
<center> | |
<br/><br/><br/><br/> | |
<h1>Introduce el texto a convertir a guiones</h1> | |
<br/><br/><br/><br/> | |
<form class="" action="convertir-texto-en-guiones.php" method="post"> | |
<input type="text" name="search" value="" placeholder="Tu texto aqui"> | |
<button type="submit" name="button">Convertir</button> | |
</form> | |
<br/><br/><br/><br/><br/> | |
<h1>El texto convertido es:</h1> | |
<br/><br/> | |
<?php | |
if(isset($_POST['search'])){ | |
$text = $_POST['search']; | |
//Aqui convertiras el text y agregaras los guiones | |
$cadenaConvert = str_replace(" ", "-", $text); | |
echo $cadenaConvert; | |
} | |
?> | |
</center> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Es un codigo en php ,se debe subir a un servidor para que funcione, actualmente en convertir texto a guion