My goal is to store some html-formatted data in a variable, then echo it later.
For example:
<?php
$foo = '<div id="x">';
echo $foo;
?>
The above doesn't work. Why?
Edit
Sorry for the bad question. I thought it didn't work because nothing is visible when viewed in a browser. Of course nothing is visible because there is only a div and no text. Doh! My "real life" version of the above script was broken due to an extra apostrophe.