Click to See Complete Forum and Search --> : Multiline String Assignment


Geat
02-18-2003, 08:25 AM
Does anyone know if it's possible to assign a string to a variable over multiple lines, but in one assignment? E.g.

var textstring = "This is the data
spread over
several
lines";

Obviously, this generates an "unterminated string constant" message...

Geat
02-18-2003, 08:32 AM
Thing is, I've got a PHP variable with a load of newlines already in it, so I'd like to echo it without parsing each line individually... There's no syntax I can wrap the assignment as a whole in, is there?