Whitespace was the problem, but it was due to my editor. I am using dreamweaver and I changed the Line Break Type (under Preferences > Code Format) to LF (Unix) from CF (Macintosh). Like I mentioned before, I had just recently loaded php5 onto my computer and prior to that had just used external servers (Dreamhost, 1&1, etc.) to do my programming. Here's a good bit of info: [i]Most HTML editing programs on the Mac OS operating system use "MacIntosh Line Breaks" in order to be compatible with older Mac OS's. However, in order to use "heredoc" with PHP on a Mac OS it must be saved with "Unix Line Breaks". Macintosh (CR) inserts a carriage return character and Unix (LF) inserts a line feed character. You need line feed characters in order for "heredoc" to work. If you're using Adobe GoLive 7.0: 1. In the program menu go to GoLive>Web Settings 2. In the pop-up menu where it says, "Line Break Character" select Unix (LF) from the select box and close the pop-up. Note: Once you do this with GoLive you have to create a New document and add "heredoc" to it because this setting only applies to newly created files in the program. If you're using BBEdit on Mac OS X: 1. In the program menu go to File > Save As 2. Select "Options" at the bottom of the pop-up window 3. Change the "Line Breaks" select box from "MacIntosh" to "Unix" and then save the file. If you've coded it correctly it will now work.[/i] here is the whole thread: http://www.kcpug.org/site/modules/newbb/viewtopic.php?topic_id=241&forum=4&PHPSESSID=a626114d9f6b9af4590aba12374bc738