I have a problem with str_replace that is driving me mad.
This bit of code works, the string is found and replaced.
- Code: Select all
$find ='><a href="http://my.url.com/fancy-dress';
$_menu = str_replace($find, ' id="fancy-dress-tab"' . $find, $_menu);
This bit of code does not work (the only addition is a second " in the first line)
- Code: Select all
$find ='><a href="http://my.url.com/fancy-dress"';
$_menu = str_replace($find, ' id="fancy-dress-tab"' . $find, $_menu);
$_menu definately contains the string, can anybody spot what I've done wrong? I've tried double quoting the string and escaping the internal "
Are there any limits to str_replace that might be causing my problem
Thanks

