I am not going to argue about the choice of a template engine against only PHP. I choose not to use a template engine, like Smarty, because I would like to learn how to prop
Using Richard's example, but more simple:
Users if(count($users) > 0): ?> Id First Name Last Name foreach($users as $user): ?> = htmlentities($user->Id) ?> = htmlentities($user->FirstName) ?> = htmlentities($user->LastName) ?> endforeach ?> else: ?> No users in the database. endif ?>
No users in the database.