[PHP] Escaping double quotes

2006-05-25 Thread Pavleck, Jeremy D.
So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq' function is what I'm looking for.

Re: [PHP] Escaping double quotes

2006-05-25 Thread Dave Goodchild
On 25/05/06, Pavleck, Jeremy D. [EMAIL PROTECTED] wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes?

Re: [PHP] Escaping double quotes

2006-05-25 Thread siavash1979
So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq' function is what I'm looking

Re: [PHP] Escaping double quotes

2006-05-25 Thread John Nichel
Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to 'wrap' that so I don't have to escape quotes? Something like perls 'qq'

Re: [PHP] Escaping double quotes

2006-05-25 Thread Mindaugas L
or heredeoc syntax :) On 5/25/06, John Nichel [EMAIL PROTECTED] wrote: Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie here) and it checks to see if a var is set, if it isn't it spits out the form info like so: echo form action=myform.php method=post; Now is there a way to

Re: [PHP] Escaping double quotes

2006-05-25 Thread Shane
Not sure I understand your question correctly. I think you can just use soemthing like: echo 'form action=myform.php method=post'; Mindaugas L wrote: or heredeoc syntax :) On 5/25/06, John Nichel [EMAIL PROTECTED] wrote: Pavleck, Jeremy D. wrote: So I'm writing this page (PHP Newbie

[PHP] Escaping double quotes?

2001-02-24 Thread Ben Cheng
How do you escape double quotes? I have the following which is supposed to make any " in a string into \" but it doesn't seem to work. What's wrong with it? $tmp_string = str_replace ("\"", "\\\"", $tmp_string); -Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Escaping double quotes?

2001-02-24 Thread Joe Stump
addslashes() usually works for me... --Joe On Sun, Feb 25, 2001 at 01:46:30AM -0500, Ben Cheng wrote: How do you escape double quotes? I have the following which is supposed to make any " in a string into \" but it doesn't seem to work. What's wrong with it? $tmp_string = str_replace