Re: Syntax Help, Please

From: Date: Tue, 15 Jun 2004 17:48:01 +0000
Subject: Re: Syntax Help, Please
Groups: php.general 
Request: Send a blank email to php-general+get-188337@lists.php.net to get a copy of this message
In a message dated 6/15/2004 10:20:59 AM Pacific Daylight Time, php@douville.net writes: >I've forgotten how to assign something like this... > >$someStr = EOF>>>" > bunch of raw non-echo'd html >" >EOF>>>; > >But can't seem to get the right syntax. Tried looking in the manual, but >don't even know what I'm looking for! This way of entering text is called a heredoc. The syntax goes like this: $varname = <<<ENDSTRING text ENDSTRING; ENDSTRING is any string you want, typed both at the beginning and at the end of the string. The first ENDSTRING must be at the end of the first line, with nothing following it, not even a space. And the ENDSTRING on the last line must be at the start of the line, with nothing before it, not even a space, and nothing following it other than the semicolon. Janet --------------------------------- Janet Valade, author, PHP & MySQL for Dummies; PHP 5 for Dummies

« previous php.general (#188337) next »