php定义一个函数,输出页面表格?
1个回答
展开全部
function get_users()
{
//组装数据
$data = [
['username' => '张三', 'gender' => '男', 'age' => 19, 'like' => '羽毛器'],
['username' => '李四', 'gender' => '男', 'age' => 20, 'like' => '篮球'],
['username' => '王五', 'gender' => '女', 'age' => 20, 'like' => '瑜伽'],
];
//返回
return $data;
}
{
//组装数据
$data = [
['username' => '张三', 'gender' => '男', 'age' => 19, 'like' => '羽毛器'],
['username' => '李四', 'gender' => '男', 'age' => 20, 'like' => '篮球'],
['username' => '王五', 'gender' => '女', 'age' => 20, 'like' => '瑜伽'],
];
//返回
return $data;
}
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询