Re: Some ways to improve it?
| From: | Andrei Zmievski | Date: | Wed, 05 Dec 2001 18:50:03 +0000 |
| Subject: | Re: Some ways to improve it? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2150@lists.php.net to get a copy of this message | ||
On Wed, 05 Dec 2001, Ricard Pillosu wrote:
> Just wondering how to improve something like this:
>
> {if $smarty.get.last == ""}
> {assign var="last" value="0"}
> {else}
> {assign var="last" value=$smarty.get.last}
> {/if}
>
> code explains itself ...
{assign var="last" value=$smarty.get.last|default:0}
-Andrei
Linux is like living in a teepee.
No Windows, no Gates, Apache in house.
- Usenet signature