Friday, November 14, 2008

replace spaces with plus signs php

Use PHP to replace spaces with plus symbol in a string?


$myString = "1234 Example Street";
$newStr = str_replace( " ", "+", $myString );
echo( $newStr );

No comments: