note 16616 added to control-structures.switch

From: Date: Tue, 06 Nov 2001 20:14:13 +0000
Subject: note 16616 added to control-structures.switch
Groups: php.notes 
Request: Send a blank email to php-notes+get-20519@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 -- http://www.php.net/manual/en/control-structures.switch.php http://master.php.net/manage/user-notes.php?action=edit+16616 http://master.php.net/manage/user-notes.php?action=delete+16616 http://master.php.net/manage/user-notes.php?action=reject+16616

« previous php.notes (#20519) next »