note 71871 modified in tutorial.useful by danbrown
| From: | danbrown@php.net | Date: | Thu, 18 Nov 2010 14:55:27 +0000 |
| Subject: | note 71871 modified in tutorial.useful by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-174154@lists.php.net to get a copy of this message | ||
While it's easy to get carried away mixing your logic and presentation together since it's
so easy to do, you're better off using PHP within HTML only to fill in values, or include other
source files.
Keep your actual processing in separate libraries that are called before you send any headers to the
page. Try to avoid calling a script that retrieves or sets information, or manipulates it in the
middle of your HTML. You'll find it's much easier to maintain.
--was--
While it's easy to get carried away mixing your logic and presentation together since it's
so easy to do, your better off using PHP within HTML only to fill in values, or include other source
files.
Keep your actual processing in separate libraries that are called before you send any headers to the
page. Try to avoid calling a script that retrieves or sets information, or manipulates it in the
middle of your HTML. You'll find it's much easier to maintain.
http://php.net/manual/en/tutorial.useful.php