Home >Backend Development >PHP Tutorial >foreach后,什么也echo不出

foreach后,什么也echo不出

WBOY
WBOYOriginal
2016-06-23 13:54:371072browse

<?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;}}}?>



为什么echo $bb,什么也没有?
是能显示出1,2,3,4……19,20,21的


回复讨论(解决方案)

已搞定!!!

$aa=$_POST['bh'];
post 提交后才会有值

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn