Page 1 of 1

Assigning Values to Variables like in Perl

Posted: Mon May 31, 2004 2:28 pm
by webcan
Hey there -

In Perl, you can assign values to a variable in a freeform sort of format by doing the following:

Code: Select all

($body = <<END);
whatever you want
blah blah blah
123 $othervariable
END
In this case, the $body variable would contain all the stuff on those three lines, including the actual value of $othervariable.

Can this be done in PHP?

Thanks,
Peter.

Posted: Mon May 31, 2004 2:33 pm
by Weirdan

Posted: Mon May 31, 2004 3:57 pm
by webcan
Thanks!!