Im not sure if this is your problem, but it was mine awhile ago :) Make sure there are no spaces after closing off heredoc.. so on your line:
EOF; Make sure there is nothing except a hard return, no spaces, no characters.. nothing! Cheers! Rick "By three methods we may learn wisdom: First, by reflection which is noblest; second, by imitation, which is the easiest; and third, by experience, which is the bitterest." - Confucius > From: Simon Coggins <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Sun, 8 Jun 2003 19:10:06 +1000 > To: [EMAIL PROTECTED] > Subject: [PHP] A Question with heredoc > > Hi > I'm writing a wrapper for some mailman archives and i'm trying to put > them message into a variable as in: > > $body = <<<EOF > text here..... > EOF; > > But I'm getting an error because of some charactors. ^L to be > specific. If the text contains a control char I get: > > Code: > <pre> > <? > $test = <<<EOF > line 1 > ^L > line 2 > EOF; > echo $test; > ?> > </pre> > > Error: > Warning: Unexpected character in input: '' (ASCII=12) state=5 in > test.html on line 6 > > Is there any way I can stop it complaining about it. Or is there > another way I can put the the text into the string (it's done via a > template file and a string substitution). The contents could be > anything so I thougth heredoc would work.. > > Thanks in advance.. I'm not on the list so please reply to me directly. > > Regards > Simon > > -- > Simon Coggins (SAGE-AU Member) Email: [EMAIL PROTECTED] > Network and System Management Officer Phone: +61-2-4221-3775 > Information Technology Systems (ITS) Mobile: 0408 115861 > University of Wollongong, 2522, Australia Fax: +61-2-4229-1985 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php