Heim >Backend-Entwicklung >PHP-Tutorial >foreach后,什么也echo不出
<?php $_result2 = _query("SELECT * FROM dj");while (!!$_rows = _fetch_array_list($_result2)){ ?><tr><td><?php echo $_rows['bh'];?><input name="bh[]" type="hidden" value="<?php echo $_rows['bh'];?>"/></td></tr><?php$aa=$_POST['bh'];if (is_array($aa)){foreach ($aa as $bb){ echo $bb;}}}?>
已搞定!!!
$aa=$_POST['bh'];
post 提交后才会有值