BobDoleX
10-19-2003, 03:40 AM
i asked a question about this kinda a while ago, but now i'm wondering if using cases, ie:
switch($information) {
case 1:
$destination = "Good";
break;
case 2:
$destination = "Bad";
break;
default:
$destination = "Ok";
break;
}
instead of
if ($information == 1) {$destination = "Good"}
elseif ($information == 2) {$destination = "Bad"}
etc...
I'm currently using the if/elseif way, but i have around 200 or those so i think it's making the site load very slow, so i'm wondering if using the cases way would make it faster? Thanks
switch($information) {
case 1:
$destination = "Good";
break;
case 2:
$destination = "Bad";
break;
default:
$destination = "Ok";
break;
}
instead of
if ($information == 1) {$destination = "Good"}
elseif ($information == 2) {$destination = "Bad"}
etc...
I'm currently using the if/elseif way, but i have around 200 or those so i think it's making the site load very slow, so i'm wondering if using the cases way would make it faster? Thanks