On 20 Mar 2010, at 04:35, romtek wrote:

> function phptal_tales_erorrclass($fieldname, $nothrow)
> {
>   return phptal_tales('true:error/'.$fieldname, $nothrow)." ? 'error' : NULL";
> }
> 
> <label class="${errorclass:first_name} labelbox">
> 
> 
> I've noticed "true:" there. Is "true" one of PHPTALES? (It's not documented 
> at http://phptal.org/manual/en/#phptales.) If so, are there other 
> undocumented ones? If not, then would you please explain how this code works?

It's equivalent of PHP's !empty(), i.e. checks if variable exists and evaluates 
to true. I've added it to documentation in SVN and push it live on next update.

-- 
regards, Kornel


_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to