RE: [PHP] Is there an alternative to double quotes?

From: Date: Wed, 23 Oct 2002 14:11:00 +0000
Subject: RE: [PHP] Is there an alternative to double quotes?
Groups: php.general 
Request: Send a blank email to php-general+get-121093@lists.php.net to get a copy of this message
You can do: echo '<form action="registertest.php" method="post"> <input type="hidden" name="fname" value="' . $fname .'">'; Not as clean but works ... and gets messy if you need a lot of newlines. > -----Original Message----- > From: Glen Lee Edwards [mailto:glen@fcwm.org] > Sent: Wednesday, October 23, 2002 10:08 AM > To: php-general@lists.php.net > Subject: [PHP] Is there an alternative to double quotes? > > > PERL has an alternative to using double quotes if you have to > print one > or several lines that contain numerous double quotes: > > print qq(<form action="registertest.php" method="post"> > <input type="hidden" name="fname" value="$fname">); > > The qq() function allows you to use double quotes, and still allows > variable interpolation. Does PHP have a similar function, or > do I have > to backslash all double quotes all the time? > > Regards, > > Glen

« previous php.general (#121093) next »