There are multiple variables say $a,$b,$c,$d
having boolean value. So what i am trying to do is .
if($a){echo 1;}
if($b){echo 2;}
if($c){echo 3;}
if($d){echo 4;}
and so on.. 50 variables
is there any better way to do this?
Note: More than one variable can be true.
Aucun commentaire:
Enregistrer un commentaire