Re: equivalent to PERL's qq
| From: | Nuno Silva | Date: | Tue, 27 Mar 2001 05:11:37 +0000 |
| Subject: | Re: equivalent to PERL's qq | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45706@lists.php.net to get a copy of this message | ||
hi,
try:
<?php
$this = "
select *
from xcxcxc
where var='111'";
echo $this;
?>
i'd say it's even better than qq ;)
regards,
nuno
Carsten Gehling wrote:
From: "Michael Hall" <mike@prairiefirewebdesign.com> Sent: Monday, March 26, 2001 9:36 PMHi. I'm a converted Perl guy. While I generally like PHP better thanPerl,I do severely miss the Perl operator qq, which allowed statements (in my case, lengthy SQL statements) to be written on multiple lines. $this = qq|Select * From xsdfs Group by date Order by id |; Is there anything similar to this in PHP? I've been unable to find it if there is.Check out this page: http://php.net/manual/en/language.types.string.php and read the paragraphs about the "here doc"´syntax. It might be what you're looking for. - Carsten