note 16616 deleted from control-structures.switch by david
| From: | david@php.net | Date: | Thu, 30 May 2002 15:52:36 +0000 |
| Subject: | note 16616 deleted from control-structures.switch by david | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-31215@lists.php.net to get a copy of this message | ||
You can use conditional operators to the switch tag.
Cool example:
switch (substr($a,$i,1)) {
case "á" || "à" || "ã" || "â":
$a = str_replace(substr$a,$i,1),"a",$a);
break;
case "é" || "è" || "ê":
$a = str_replace(substr($a,$i,1),"e",$a);
break;
}
Have fun