note 21701 added to control-structures.switch
| From: | claudius.gerstner@php.net | Date: | Thu, 23 May 2002 17:50:22 +0000 |
| Subject: | note 21701 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30951@lists.php.net to get a copy of this message | ||
to pwykes@osv.org
<quote>
The conditional example using 'or' did not work for me. The example was:
case "é" || "è" || "ê":
$a = str_replace(substr($a,$i,1),"e",$a);
break;
</quote>
using brackets around the conditions it'll work!
example:
...
case ("é" || "è" || "ê"):
$a = str_replace(substr($a,$i,1),"e",$a);
break;
...
--
http://www.php.net/manual/en/control-structures.switch.php
http://master.php.net/manage/user-notes.php?action=edit+21701
http://master.php.net/manage/user-notes.php?action=delete+21701
http://master.php.net/manage/user-notes.php?action=reject+21701