我有这段代码,它应该打印我所有可能的 pdv,它有一个id=super_selected_1
. 问题是,如果我在它工作的时候打印$super_selected_1
里面,它会取值,但是在复选框里面它不会显示它,我在这里做错了吗?谢谢。
$super=array();
while ($row = mysql_fetch_array($query3)) {
$super[]=$row['id_pdv'];
}
foreach($super as $super_selected_1){
$sqlsuper_1="SELECT * FROM pdv WHERE id_pdv='$super_selected_1' AND regione_pdv='$term1'";
$querysuper_1 = mysql_query($sqlsuper_1) or die (mysql_error());
while ($row = mysql_fetch_array($querysuper_1,MYSQL_ASSOC)) {
echo $super_selected_1;
echo '<input type="checkbox" name="checkbox[]" id="checkbox[]" class="pdv_super" value="'.$row['id_pdv'].'" >' . $row['nome_pdv'] . '<br>';
}
}