PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Gidday guys - a humble newbie with what is most likely a rather humble question here.
Is there anything that causes an <<<EOD call to throw an "unexpected $end" error message in PHP 5.2 apart from missing curly brackets/semicolons? I'm using the following code - as soon as I replace the EOD call with double-quotes it all works fine. Any suggestions most appreciated.
Many thanks,
- Mr Cheese
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Last edited by MrCheese on Mon Mar 05, 2007 8:40 am, edited 2 times in total.
Sincere thanks Feyd & CoderGoblin, most appreciated. I should have figured it was something like that. Apologies about using code instead of php markers - I'll be sure to get it right from here in.
There are a few gotchas to look for in HEREDOC syntax. If you are going to use it, you should read the manual on its proper usage (and it does talk about the ending syntax and the error message PHP throws when the end is not all the way to the left, on its own line with nothing else on it ).