note 20090 deleted from control-structures.switch by cmb
| From: | cmb@php.net | Date: | Sun, 21 Apr 2019 11:52:31 +0000 |
| Subject: | note 20090 deleted from control-structures.switch by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-210646@lists.php.net to get a copy of this message | ||
Note Submitter: gray dot quinn at catch-e dot com dot au
----
To get the conditional statement to work for the above example use this:
<?php
$chr = substr($a,$i,1);
switch (TRUE) {
case $chr == "á" || $chr == "à" || $chr == "ã" || $chr ==
"â":
$a = str_replace(substr($a,$i,1),"a",$a);
break;
case $chr == "é" || $chr == "è" || $chr == "ê":
$a = str_replace(substr($a,$i,1),"e",$a);
break;
?>
}