i am trying to write what should be a simple str_replace command.
//$sidebar contains html code incl links
$new_sidebar = str_replace ('<a href="', '<a href="../', $sidebar);
but this results in the following error
Parse error: syntax error, unexpected T_VARIABLE in
i have tried this with str_replace, stri_replace, ereg_replace & ereg_replace
concerend that the double quotes could be causing problems i also tried some code straight from the manual;
// Provides: Hll Wrld f PHP
$vowels = array("a", "e", "i", "o", "u", "A", "E", "I", "O", "U");
$onlyconsonants = str_replace($vowels, "", "Hello World of PHP");
i have even isolated this code to its own file now
but still the same error
any ideas out there, or previous experience with this issue?
advance thanks
Ollie.