Rumah >pembangunan bahagian belakang >tutorial php >PHP遍历有关问题,麻烦路过的有关问题
PHP遍历问题,麻烦路过的问题
数组:
<br />Array<br />(<br /> [doctorcomment] => Array<br /> (<br /> [0] => Array<br /> (<br /> [status] => success<br /> [strcommenttype] => 1<br /> [strcommentcontent] => 萨达<br /> [strcreatetime] => 2014-08-20<br /> [strusername] => wanhui<br /> [struserip] => 121.101.220.243<br /> [strmobile] => 13910527603<br /> )<br /> <br /> [1] => Array<br /> (<br /> [status] => success<br /> [strcommenttype] => 2<br /> [strcommentcontent] => sdfsd<br /> [strcreatetime] => 2014-08-20<br /> [strusername] => sdfds<br /> [struserip] => 343.2432.432<br /> [strmobile] => 18600085268<br /> )<br /> <br /> [2] => Array<br /> (<br /> [status] => success<br /> [strcommenttype] => 9<br /> [strcommentcontent] => fsfddsf<br /> [strcreatetime] => 2014-08-20<br /> [strusername] => sdfdsdfd<br /> [struserip] => 343.2432.432<br /> [strmobile] => 18600085268<br /> )<br /> <br /> )<br /> <br />)<br /><br />
<br /><?<br />if( isset($arrGetDoctorComment) && !empty($arrGetDoctorComment) && is_array($arrGetDoctorComment) ) {<br /> <br /> foreach ($arrGetDoctorComment as $arr_3) {<br /><br /> foreach ($arr_3 as $value_3) {<br /> print_r($arr_3);<br /> if ( $value_3['strcommenttype'] == "9" ) {<br /> echo "<p style=\"font-size:14px;\">".$value_3['strcommentcontent']."</p>";<br /> echo "<br/>";<br /> echo "<span style=\"color:#757575;padding-bottom:10px;\">来自".$value_3['strusername']." ".$value_3['strcreatetime']."></span>";<br /> echo "<br/>";<br /> echo "<hr/>";<br /> } else {<br /> echo "null date"; <br /> }<br /> }<br /> }<br /> }<br />?><br /><br /><br />
foreach ($arrGetDoctorComment as $arr_3) {<div class="clear"> </div>