Re: Nested quotes - how can I make it work?

From: Date: Wed, 23 Oct 2002 15:35:18 +0000
Subject: Re: Nested quotes - how can I make it work?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-121115@lists.php.net to get a copy of this message
Thanks, you got me on the right track. My problem was getting the eval to work. Bit of a dogs dinner, but this now works: <?php $e=addslashes("onBlur=".'"'."calcNumber(this,'Price')".'"'); echo $e.'<br>'; echo "\$x='$e'".';<br>'; eval("\$x='$e'".';'); echo $x; ?> Faisal Abdullah wrote:
Perhaps you should try: $x = "onBlur=\"calcNumber(this, 'Price')\""; Regards, Faisal -----Original Message----- From: Phoebe Bright [mailto:phoebebright@spamcop.net] Sent: Wednesday, October 23, 2002 5:57 PM To: php-general@lists.php.net Subject: [PHP] Nested quotes - how can I make it work? I want to do this: $x="onBlur="calcNumber(this,'Price')""; but of course it doesn't work because there are nested quotes. Is there another way of achieving the same thing? Another kind of quote I could use perhaps? Any help much appreciated.


« previous php.general (#121115) next »