Re: Escaping double quotes

From: Date: Thu, 25 May 2006 19:46:06 +0000
Subject: Re: Escaping double quotes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236906@lists.php.net to get a copy of this message
> 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 > > Jeremy Pavleck > Network Engineer - Systems Management > IT Networks and Infrastructure > > Direct Line: 612-977-5881 > Toll Free: 1-888-CAPELLA ext. 5881 > Fax: 612-977-5053 > E-mail: jeremy.pavleck@capella.edu > > Capella University > 225 South 6th Street, 9th Floor > Minneapolis, MN 55402 > > www.capella.edu I believe you can just use single qiote for this example of yours. echo '<form action="myform.php" method="post">';

« previous php.general (#236906) next »