4 ms·
separation of concerns and DRY would be the two main reasons I'd put forward. Anything involving manipulating your data / business logic should not be embedded
by tehbeard 11y ago
separation of concerns and DRY would be the two main reasons I'd put forward.
Anything involving manipulating your data / business logic should not be embedded in a template.
PHP in your html should really be for display/rendering (i.e. looping over a list of Employee records), it should not be fetching those records itself (either by Employee::fetchAll() or especially mysql_query("SELECT * from employee") )