php - if statement does not work inside while loop which is inside for loop -
i've spent hours on problem , , searched answer online, found nothing helped me. so, making filter hotel website, , 1 of criteria hotel search district hotel located. use method: <?php if (isset($_get['district1'])){ $district1= ($_get["district1"]); }else ($district1=0); if (isset($_get['district2'])){ $district2= ($_get["district2"]); }else ($district2=0); if (isset($_get['district3'])){ $district3= ($_get["district3"]); }else ($district3=0); if (isset($_get['district4'])){ $district4= ($_get["district4"]); }else ($district4=0); ?> where $district1, $district2, $district3, $district4 4 different districts of city. what trying build district variables using for loop (the digit @ end of variable name ascending 1 : $district1.. 2 .. 3 .. 4 ), then place these district variables in if clause inside while loop follows: <?php $districts_filter_query=...