Strange? whn I copied my code over it put in "_" underscores between the words?
PHP strings
try going here and tell me what you get
Originally posted by shoshumi
Strange? whn I copied my code over it put in "_" underscores between the words?
it does that every now and then
Originally posted by stolzyboy
try going here and tell me what you get
I get:
"This uses the "here document" syntax to output multiple lines with interpolation. Note that the here document terminator must appear on a line with just a semicolon no extra whitespace!"
which is correct. But heredoc doesnot work on my machine. Myabe becasue I'm writing code with OSX/ Dreamweaver?
not too sure, my site is hosted on RH linux, and php 4.3.2, and i just tested that same code on my windows box with php 4.3.2, and my os x box with 4.3.2, and they all work just fine
Strange... well I'll keep trying. If i find a solution I will post it here.
thanks a bunch for your help
np, let us know...
Just a note...
Along with making sure that the here document terminator (END appears on a line with no extra whitespace, try making sure that the here document starter ($foo = <<<END) also appears on a line with no extra whitespace.
thanks again,
no such luck though. I've tested other scripts and they work but heredoc strings just give me blank pages. tried removing whitespace many different ways and writing code in different editors still no luck. I'm looking at the php.ini file to see if something is off or wrong.
keep you posted
I got it too work!
I restarted my apache server, then I tried starting from a fresh page. It seems not to work if you copy and paste code from this forum, it will not work even when you remove whitespaces.
Write it out yourself and it works..hmmm
Hi. Just curious... did you originally copy-paste straight to a text only editor?
yes, straight into my Dreamweaver MX. (codeview)
I was also using code downloaded from a PHP book I'm reading and it did not work but now it does after the apache restart.
But I found after the restart copying and pasting is a no-no even if I removed the white space.
why do you ask?
I'm not sure if I'm recalling this correctly, but a copy-paste from these forums staright to Dreamweaver doesn't necessarily work. If I am recalling correctly, I think you have to copy-paste to a text only editor such as Notepad and then copy-paste from Notepad to Dreamweaver.