在一个页面中执行此PHP + MYSQL的更好方法是什么?

goo*_*ing 0 html php coding-style

我的方法:

<?

switch($id) 
{ 
    case 1:
?>
        a lots of html stuff goes here...
<?    
    break;  
    case 2:
?>
        a lots of html stuff goes here2...
<?    
    break;        
}

?>
Run Code Online (Sandbox Code Playgroud)

有什么方法可以做这个漂亮的东西吗?我的意思是更具可读性或什么?我真的应该这样做.(还没学会聪明......)

Ign*_*ams 9

将HTML分成单独的文件并将它们包含在相关的块中.