Can't replace + with ereg_replace
Posted: Thu May 13, 2004 2:57 am
in order to pass names from page to page via get but i have problems!
I succeded running first this code:
їcode]$loc=ereg_replace(" ","+",$loc);ї/code]
but when i use
їcode]$plus='+';
$loc=ereg_replace($plus, " ",$loc);ї/code]
or
$loc=ereg_replace("+", " ",$loc);
i get this error:
Warning: Invalid preceding regular expression in /home/greeceqt.com/www/locations_islands.php on line 15
What is wrong?I guess that the problem is + which may be confused with its operator ability!
I succeded running first this code:
їcode]$loc=ereg_replace(" ","+",$loc);ї/code]
but when i use
їcode]$plus='+';
$loc=ereg_replace($plus, " ",$loc);ї/code]
or
$loc=ereg_replace("+", " ",$loc);
i get this error:
Warning: Invalid preceding regular expression in /home/greeceqt.com/www/locations_islands.php on line 15
What is wrong?I guess that the problem is + which may be confused with its operator ability!