I know this seems simple, but it's starting to anger me...
$test = "(apple)";
$test2 = "(apple), (pear), (smile)";
echo "<br>1- $test";
echo "<br>2- $test2";
$test2 = ereg_replace($test,"",$test2);
echo "<p><b>$test2";
Displays as:
1- (apple)
2- (apple), (pear), (smile)
(), (pear), (smile)
Why isn't it displaying:
1- (apple)
2- (apple), (pear), (smile)
, (pear), (smile)
I've tried addslashes and manually adding \'s to the test variables and that isn't working.
Any help would be great, thanks!