I've been wondering about this...
A lot of the pages I write have conditional sections. For example, if the person who logged in is an administrator of the site, the links to the administrative section of the site are displayed. If the visitor is not an administrator it display links to our best selling products. It's a simple if...else... statement.
Up until recently, I put everything in the if/else statement, including the html sections to be written to the page and I just escaped all the quote marks wherever needed.
Being fairly new at PHP, I recently discovered I don't have to write it all in php and echo out the html, I can end the php code, write the HTML and start another php section wherever the html ends.
Now I wonder... which way is best? What is more optimal? Or is the difference the same as the difference between "print" and "echo"?
Or is that just a can of worms I don't want to get into?