php-general | 2001032
Date: 03/30/01
- Next message: David Minor: "[PHP] renaming form posted variable names"
- Previous message: Jon Jacob: "Re: [PHP] More questions about installing....."
- In reply to: Kristofer Widholm: "[PHP] "Here Document" function AWOL"
- Next in thread: Kristofer Widholm: "Re: [PHP] "Here Document" function AWOL"
- Reply: Kristofer Widholm: "Re: [PHP] "Here Document" function AWOL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
http://www.php.net/manual/html/language.types.string.html#AEN2504
what you wrote looks correct...just make sure you have no trailing
whitespace on the
$body = <<<EOQ line (hit return right after the q)
same with EOQ; it has to be on a line by itself...
best of luck
jack
Kristofer Widholm wrote:
>
> Dear PHPers. I have tried to get the "Here Document" functionality to
> work, all to no avail.
>
> I am writing the following code:
> $body = <<<EOQ
> ....Lots of HTML stuff here
> Lines and Lines and lines of it.
>
> ....
> all the way to
> EOQ;
>
> I get a parse error on the first line where I declare the variable. I
> have tried it in several different ways, such as
> $body=
> <<<EOQ
>
> But I get parser errors every time.
>
> My PHP version is 4.0.2
>
> Anyone know when Here Documents were first implemented in PHP
> (version number)? Do I need to set GPC or magic-quotes to a certain
> value at runtime for this to work?
>
> I could not find "here document" even MENTIONED on the entire php
> site. Nor could I find it in the mailing list archives. I did find
> out about it at the Zend tutorial on strings, and have seen it in a
> script at px.sklar.
>
> Kristofer
> --
> ______________________________________
>
> Kristofer Widholm
> Web Pharmacy
> webpharmacy <email protected>
> 191 Grand Street, Brooklyn NY 11211
> 718.599.4893
> ______________________________________
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: David Minor: "[PHP] renaming form posted variable names"
- Previous message: Jon Jacob: "Re: [PHP] More questions about installing....."
- In reply to: Kristofer Widholm: "[PHP] "Here Document" function AWOL"
- Next in thread: Kristofer Widholm: "Re: [PHP] "Here Document" function AWOL"
- Reply: Kristofer Widholm: "Re: [PHP] "Here Document" function AWOL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

