Character Replace within a String using PHP
Replacing a character within a string is easy and very useful. The only problem is I have the hardest time remembering the syntax so I figured I would post it here.
View Code PHP
$string = 'test-data'; //Remove the "-" and replace it with a space $new_string = str_replace('-',' ', $string ); echo $new_string; //test data |




