Re: php modify my javascipt code before output????

From: Date: Wed, 16 Jan 2002 01:34:04 +0000
Subject: Re: php modify my javascipt code before output????
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80646@lists.php.net to get a copy of this message
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: http://www.php.net/manual/en/language.types.string.php Another function you might want to look at is stripslashes(): http://www.php.net/manual/en/function.stripslashes.php --|-- Tino Didriksen http://ProjectJJ.dk/

« previous php.general (#80646) next »