Created
November 22, 2013 00:00
-
-
Save underdown/7592221 to your computer and use it in GitHub Desktop.
str_replace vs explode
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 | |
| $headline = $_GET["headline"]; | |
| $headline = str_replace('+', ' ', $headline); | |
| $text_line = explode("+",$headline); | |
| for ($start=0; $start < count($text_line); $start++) { | |
| print $text_line[$start] . " "; | |
| } | |
| ?> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
umm line #3 should be commented out