Hello guys I have this table :
ID| NUM_Slides |P1 | P2 | P3 | P4 | P5 | P6 | P7 | P8 | P9 | P10 | P11 | P12
3 | 2 |1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
I want to select the values only from P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11 and P12 and insert them into a <option>
tag
I got this so far but dont work
<?php
$query = "SELECT P1,P2,P3,P4,P5,P6,P7,P8,P9,P10,P11,P12 FROM slider_settings_img where slider_settings_img.ID = $ID";
$result1 =$connect->query($query);
$resultado = $result1->fetch_all();
?>
<select name ="selectedValue" id="selected" >
<?php while($row1 = mysqli_fetch_array($result1)):;?>
<option value=""<?php echo $row1[1];?>"><?php echo $row1[1];?>"</option>
<?php endwhile;?>
</select>
because my query only return 1 array I want the Options to be display 1,1,0,0,0,0,0,0,0,0,0
can some 1 help me