Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdiasriver/a04f7e9796ffa0f3519fff89f08231bb to your computer and use it in GitHub Desktop.
Save abdiasriver/a04f7e9796ffa0f3519fff89f08231bb to your computer and use it in GitHub Desktop.
<!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>
@abdiasriver
Copy link
Author

abdiasriver commented Aug 11, 2021

Es un codigo en php ,se debe subir a un servidor para que funcione, actualmente en convertir texto a guion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment