Hello,
after the import (with which Marco van H. has helped us out superbly!! thumbs up mate
)
I was cleaning up some of the code pieces from the old board layout.
Unfortunately there was a sneaky thing in there, some of the strings I want to replace have the " character in them.
example; I would like to replace all instances of <font color="0000ff"> with the appropriate vB code.
fill this in in the array in cleaner.php: (line 51 and further)
due to the ", the first part of the array becomes: "<font color="
and afterwards there is another unexpected ".
result:
After some experimenting I figured php has a way to distinguish between 'code " ' and 'text " '
I tried the following array as well:
but that didn't work.
consulted PHP manual, finally found out that i was using the wrong slash.
so... this is what worked for me:
so, the hint is, if you have to replace " s in your text, include a trailing backslash \ to tell php its not the end of the code piece.
after the import (with which Marco van H. has helped us out superbly!! thumbs up mate

I was cleaning up some of the code pieces from the old board layout.
Unfortunately there was a sneaky thing in there, some of the strings I want to replace have the " character in them.
example; I would like to replace all instances of <font color="0000ff"> with the appropriate vB code.
fill this in in the array in cleaner.php: (line 51 and further)
Code:
$replacer = array( "<font color="0000ff">" => "[COLOR=blue]",
and afterwards there is another unexpected ".
result:
Parse error: syntax error, unexpected T_LNUMBER, expecting ')' in /var/xirictrl/hosted/www/volvo300club/volvo300club.nl/forum/impex/tools/cleaner.php on line 51
After some experimenting I figured php has a way to distinguish between 'code " ' and 'text " '
I tried the following array as well:
Code:
"<font color=/"0000ff/">" => "[COLOR=blue]",
consulted PHP manual, finally found out that i was using the wrong slash.
so... this is what worked for me:
Code:
"<font color=\"0000ff\">" => "[COLOR=blue]",
Comment