In some languages, you can do the following in a Switch statement...is there
a way to do this in PHP? Thanks in advance
switch($voterac tion){
case '1','2','3','4' ,'5','6','7','8 ','9','10':
$db_set .= "Rating = $voteraction, ";
break;
}
or do I have to the following:
switch($voterac tion){
case '1':
$db_set .= "Rating = $voteraction, ";
break;
case '2':
$db_set .= "Rating = $voteraction, ";
break;
case '3':
$db_set .= "Rating = $voteraction, ";
break;
etc....
}
--
*************** ******
Jon Rosenberg
a way to do this in PHP? Thanks in advance
switch($voterac tion){
case '1','2','3','4' ,'5','6','7','8 ','9','10':
$db_set .= "Rating = $voteraction, ";
break;
}
or do I have to the following:
switch($voterac tion){
case '1':
$db_set .= "Rating = $voteraction, ";
break;
case '2':
$db_set .= "Rating = $voteraction, ";
break;
case '3':
$db_set .= "Rating = $voteraction, ";
break;
etc....
}
--
*************** ******
Jon Rosenberg
Comment