robbster Posted March 5, 2008 Share Posted March 5, 2008 Hi, Is there a php equivalent of <<END in perl? In perl I'd say print FILEHANDLE <<END; This is a test bla bla END And that text would be written in some file. I want to do this in php. Any ideas? I'm creating an html file on the fly and I don't want to assign my html code to say $x and then say fwrite($handle,$x); or backslash all the double quotes and single quotes. Anyone have any ideas someone can share? Thanks. Quote Link to comment Share on other sites More sharing options...
KrisNz Posted March 6, 2008 Share Posted March 6, 2008 Do you mean heredoc syntax? e.g <?php echo <<<END <b>this is some html with quotes' ' '' "" '"'' and stuff.</b> END; ?> Quote Link to comment Share on other sites More sharing options...
robbster Posted March 7, 2008 Author Share Posted March 7, 2008 Thank You! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.