When you echo or print to the HTML stream, strings are delimited by " or '.
Your case, return "<a onclick=\""+ocjs+"\", is correct JS but not PHP.

When you want to echo this in PHP you must echo it as
return \"<a onclick=\\\"\"+ocjs+\\\\
in order to counter the strings being ended before time.

More info:

Another function you might want to look at is stripslashes():

Tino Didriksen

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to