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);
天蓬老师2021-01-03 10:11:12
Multiple pieces of data are also encapsulated into arrays, and can be returned to the front end using js or other formats