Now only one data is returned. How can I get back all the data?
if(!defined('SC')){exit('Access Denied');}
$db = functions::db();
$uid = SC('post/uid');
$wid = $db->query('pinglun','',"user='{ $uid}'");
if($wid){
$array = array(
'ret'=>true,
'id'=>$wid[0]['id'],
'zan'=>$wid[0]['zan']
);
}else{
$array = array(
); 'ret'=>false
);
}
echo json_encode($array);
Multiple pieces of data are also encapsulated into arrays, and can be returned to the front end using js or other formats