PHP变量中的变量,代码片段
作者:jao 发布于:2018-10-28 10:39 分类:PHP教程
$ids=array(1,2,3,4); $sql_mul = "SELECT * FROM `usertable` WHERE `id` IN (" . implode(',', $ids) . ")"; $query_mul = $this->db->query($sql_mul); $row_mul = $query_mul->result_array(); foreach ($row_mul as $k => $val) { $host = $val['host']; ${"row_$host"}[$k] = $val; //TODO 变量中添加变量,变量中的变量 } print_r($row_xxx);
标签: php教程
我的主页统计
- 建站日期:2012-11-26