We must remember that PHP is produced on the server side and not on the client/browser end, and MX displays the layout view with a dumbed down browser type setup.
To be able to fully view what your PHP code will do and look like, you must set up MX to also work with a 'test server'.
If you do not have the 'test server' defined then you will not be able to view any dynamic content produced by PHP.
Basicly what you do is, define your test server (nothing more then redefining your site connection parameters under a different section). Then when you want to view what your PHP 'actually' looks like, you hit F12 (preview in browser) and MX will send the page to where you defined your test server and then display it in the browser after being processed.
Also as mz said above, how you implement your html/php code with each other helps.
For instance when I create dynamic tables I mix both styles of output.
<html>
<body>
<table>
<?
while($row = mysql_fetch_array($results))
{
?>
<tr>
<td>col1</td>
<td>col2</td>
<td>col3</td>
</tr>
<?
}
?>
</table>
</body>
</html>
This will allow you to view a single row of a table in 'layout' view resizing or CSS editing.
I personally don't use the preview in browser feature, I usually keep my site open and then when I have edited a page, I upload it and then view it from the net.
I hope this helps.
I code all my pages exclusivley using MX and most pages are extremely PHP laden so I have learned a few tips and tricks.
If you have any questions you can contact me directly at: scotyj1@cox.net