I'm trying to replace values within a string with a value looked up from a database. I
have a function that looks up the value in the database for me but I'm having trouble
passing the value to the function because of the backslashes, is there a way around
this?
Code:
$cntnt = eregi_replace("\[L=([a-zA-Z]+)]"."([a-zA-Z]+)\[EL]", "<a href=\"" .
fndLnk(\\1) . "\">\\2</a>", $cntnt);
fndLnk is the function and the error I receive is -
Warning: Unexpected character in input: '\' (ASCII=92) state=1
Thanks for any help
Zac