Hi,
I have this string: $i = "&xxx=123&ddd=ttt"
I want to replace the first & with ? how do I do it?
Thanks, Assaf
http://www.php.net/str_replace
This will replace all of the "&" and I need to replace only the first one.
if it's always in the first position you could just use substr
$new_str = '&' . substr($old_var,1);
ereg_replace("^&","?",$i);