echo $res['sobhaneid']."|".$res['naharid']."|".$res['shamid'];
switch ($num) {
case '1':
echo $res['sobhaneid'];
break;
case '2':
echo $res['naharid'];
break;
case '3':
echo $res['shamid'];
break;
default:
# code...
break;
}
if $num==2,the switch $res[‘naharid’]=null; but in first line $res[‘naharid’]=some value
why?