Re: equivalent to PERL's qq
| From: | Carsten Gehling | Date: | Tue, 27 Mar 2001 08:05:29 +0000 |
| Subject: | Re: equivalent to PERL's qq | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45705@lists.php.net to get a copy of this message | ||
From: "Michael Hall" <mike@prairiefirewebdesign.com>
Sent: Monday, March 26, 2001 9:36 PM
> Hi. I'm a converted Perl guy. While I generally like PHP better than
Perl,
> 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