Skip to content

Instantly share code, notes, and snippets.

@underdown
Created November 22, 2013 00:00
Show Gist options
  • Select an option

  • Save underdown/7592221 to your computer and use it in GitHub Desktop.

Select an option

Save underdown/7592221 to your computer and use it in GitHub Desktop.
str_replace vs explode
<?php
$headline = $_GET["headline"];
$headline = str_replace('+', ' ', $headline);
$text_line = explode("+",$headline);
for ($start=0; $start < count($text_line); $start++) {
print $text_line[$start] . " ";
}
?>
@underdown

Copy link
Copy Markdown
Author

umm line #3 should be commented out

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