Created
November 4, 2016 13:28
-
-
Save iconte/e2afc27c4670b1d0a6e207a3761781ba to your computer and use it in GitHub Desktop.
remove espaços em excesso entre palavras
This file contains hidden or 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
<?php | |
$frase = " Gosto de programar em PHP "; | |
$frase2 = trim(preg_replace('/ +/',' ' , $frase)); | |
echo $frase2; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment