Re: Escaping double quotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/05/06, Pavleck, Jeremy D. <Jeremy.Pavleck@xxxxxxxxxxx> 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' function is what I'm looking for.
I tried a few different functions from the website, magic_quotes,
addslashes, htmlspecial etc etc but none did what I was looking for

You know you can switch the php parser on and off like so:

<?php if (isset($var)) { ?>

<form action="myform.php" method="post">

<?php } ?>

which is a bit more efficient and better than all those echo statements and
escapes?

--
http://www.web-buddha.co.uk

dynamic web programming from Reigate, Surrey UK (php, mysql, xhtml, css)

look out for project karma, our new venture, coming soon!

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux