Re: '%' and is even
| From: | Andrei Zmievski | Date: | Thu, 13 Sep 2001 13:21:27 +0000 |
| Subject: | Re: '%' and is even | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1476@lists.php.net to get a copy of this message | ||
Try the latest snapshot, I didn't have this problem with it.
http://www.phpinsider.com/php/code/Smarty/snapshots/
On Thu, 13 Sep 2001, Markus Fischer wrote:
> Currently, I've this smarty code:
>
> <table align="center">
> {{section name=event loop=$event_list}}
> {{if %event.first%}}
> <tr>
> <td width="50%"><b>Name</b></td>
> <td width="25%"><b>Datum</b></td>
> <td width="25%"><b>Freigegeben</b></td>
> </tr>
> {{/if}}
> {{if %event.iteration% % 2 == 0 }}
> <tr bgcolor="#333333">
> {{else}}
> <tr bgcolor="#444444">
> {{/if}}
> [...]
>
> Normally I'ld write
>
> {{if %event.iteration% is even}}
> <tr bgcolor="#333333">
> {{else}}
> <tr bgcolor="#444444">
> {{/if}}
>
> But this gives me:
>
> Warning: Undefined offset: 0 in
> /public/mfischer-home/mfischer/public_html/php/include/Smarty_Compiler.class.php
> on line 633
>
> Warning: Undefined variable: negate_expr in
> /public/mfischer-home/mfischer/public_html/php/include/Smarty_Compiler.class.php
> on line 667
>
> Looking at Smarty_Compiler.class.php I could easily remove this
> warnings with adding some '@'s, but this ain't the right
> solution, right?
>
> Btw, I'm using latest stable 1.4.4
>
> ty,
> Markus
>
> --
> Markus Fischer, http://guru.josefine.at/~mfischer/
> EMail: mfischer@guru.josefine.at
> PGP Public Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
> PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5 D674 B445 C227 2BD0
> -All your scripts are belong to Zend-
>
> ---
> You are currently subscribed to smarty as: andrei@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
-Andrei
Any sufficiently advanced Operating System
is indistinguishable from Linux.
- Jim Dennis