In article <079201c1151f$ec6472e0$6500000a@cicse>,
[EMAIL PROTECTED] (Clayton Dukes) wrote:
> Can someone tell me why this doesn't work?
>
> $home street = ereg replace (" " , "+" , $home street);
>
> The input is "123 happy trail"
> I need the output to be "123+happy+trail"
Using an ereg here is overkill. $home_street=str_replace(" ","+",$home
street);
As to why it's not working as-is... The syntax is fine, so it must be
failing because there are no matches to replace. Either you don't have
spaces in the string (could they be " " instead?) or you don't have a
space in that match string (is it a tab instead?).
--
CC
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]