Forum Moderators: coopster
<?php
some while loops, etc.
?>
more HTML
I recently looked at a copy of some forum software written in PHP and they tend to keep all PHP files as complete PHP. Any HTML that needs to be included is included from a separate include file.
Is this good practice to keep PHP pages neat and easy to understand or is it just up to personal preference?
I find it hard to see how you can have dynamic HTML if you have to include separate include files all the time?
It is all down to personal preference really and how you want to lay things out. All because you have messy code, that doesn`t mean the program won`t function how you want it to. However, if you have to leave some coding for a while and come back to it later, its a good idea to comment everything so you know what it is.
dc
FRONT Page. open it make a smalle page by entering images links etc and then go to HTML view and then see the coding style how it is organized and then while u write coding follow that style and YES write comments with coding it will help u to edit it after sometime.
It would be neater just to have an include and then the 20 lines of PHP code but just wondering if there's any tried and tested ways of doing this...