Jan 2012 12
<?php
if ($a == $b)
    echo "ab";
?>

<?php if ($a == $b) { ?>
    echo "ab";
<?php } else { ?>
    echo "c";
<?php } ?>

<?php
echo <<<EOL  // <- We use the heredoc operator. Notice 3 times '<'
    <div id="menu_show" class="...">
      ...
    </div>
EOL
;  // End the heredoc block. Has to be the first characters on the line, so don't indent it.
?>
Share

Leave a Comment