On Wed, 2006-06-28 at 13:55, Jon Anderson wrote:
> I really don't understand why people have such disregard for PHP as a 
> template system... I'm not saying one way is better or worse (it's 
> really a matter of preference), just that the PHP way isn't implicitly 
> bad or messy...
> 
> /* The Smarty way */
> $smarty->assign('display_variable',$display_variable);
> ...
> {* template *}
> <dl>
>   {foreach key=key item=var from=$display_variable}
>     <dt>{$key}</dt><dd>{$var}</dd>
>   {/foreach}
> </dl>
> 
> /* The PHP way */
> <dl>
>   <?php foreach ($display_variable as $key => $var) { ?>
>     <dt><?= $key?></dt><dd><?= $var ?></dd>
>   <?php } /* end foreach ($display_variable) */ ?>
> </dl>
> 
> Is it really *that* bad?

YES!

Simplistic examples don't properly illustrate the mess that occurs in
complex situations.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to