What is the best way to save my php files with php code only?
There are several statements about this, so Iโll just say that whatever you choose, stick to it.
As a rule, you can use a template system (for example, Smarty) so that your files are formally cleared of PHP code, but this has some drawbacks in the speed department.
Alternatively, you can use minimal code, tearing out display-related fragments and using small PHP fragments in it, for example
<?php foreach ($myArray as $myElement): ?>
<tr>
<td><?php echo $myElement; ?></td>
</tr>
<?php endforeach; ?>
, HTML, - ; , Smarty - , . , codeigniter Zend Framework (, Smarty, ).
, - . , 100% ( , /) , .
MVC (model-view-controller). MVC - (HTML).
MVC: http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
PHP, MVC, .: http://www.phpframeworks.com/