Re: Re[2]: [SMARTY] switch statement ?

From: Date: Mon, 29 Apr 2002 13:42:45 +0000
Subject: Re: Re[2]: [SMARTY] switch statement ?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3923@lists.php.net to get a copy of this message
--- Bertrand DUNOGIER <bdunogier@wanadoo.fr> wrote: > I'm not a begginer programmer, you know :) > > I just notice that i happen to have some > {if ...} > ... > {elseif} > ... > {elseif} > ... > {else} > ... > {/if} > statements. And this is typically what can be replaced by a > switch > with a good increase in code quality. I have to agree with this one. XSL uses a variant of switch which will likely make this an issue again: <xsl:choose> <xsl:when test="total &lt; 10"> <HR STYLE="color:red"/> </xsl:when> <xsl:when test="total &lt; 20"> <HR STYLE="color:pink"/> </xsl:when> <xsl:otherwise> <BR/> </xsl:otherwise> </xsl:choose> Brent __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com

« previous php.smarty.general (#3923) next »