I agree. I should have put in a better example. But I still think...{html_select_date time="$begDate" prefix="begDate" start_year="2001" end_year="+1"}... is more readable. Not only is the pure PHP snippet above ~15 lines longer, that doesn't even include the application logic. Nitpicky detail: Your snippet doesn't have any selected options, whereas the Smarty code does ($begDate). So there'd be even more PHP tags and vars in the mix, with conditionals.But html_select_date is really just some of the icing on the cake. I'd still use it even if it only had control flow and modifiers.
…and I agree with your point as well about simplicity. But, I would still rather see the front-end guy using a PHP function instead of a Smarty function. He could just as use use:
<? html_select_date($begDate, begDate, 2001, +1); ?>…and yes, I think it wasteful for each developer to manually recreate all of the necessary font-end functions for each project, but why didn't the Smarty developers just create a class or an include file (or several so that you only had to include the "sets" that you needed) with all of the slick functions that you need instead of an entirely new engine, syntax, and layer?
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
