php if条件判断数组返回[false]
{"code":200,"message":"success","data":[false]}
$sql_notice=mysql_query(sql语句)<br /> $arrData =array();<br /> while ($arrData[] = mysql_fetch_array($sql_notice))<br /> {<br /> $arrData;<br /> }<br /> $sData = array_values($arrData);<br /> if(。。。){<br /> Response::json(200,'success',$sData);<br /> }else{<br /> Response::json(400,'error',"");<br /> }<br />
$arrData =array();<br /> while ($$row = mysql_fetch_array($sql_notice))<br /> {<br /> $arrData[] = $row;<br /> }<br /> if($arrData) {<br /> Response::json(200,'success',$arrData);<br /> } <br />.....