<?php $firstname = "Bill"; $lastname = "Gates"; $age = "60"; $result = compact("firstname", "lastname", "age"); print_r($result); ?>
==============================================
Array ( [firstname] => Bill [lastname] => Gates [age] => 60 )
php 将几个变量合为数组,变量名和值对应
猜你喜欢
转载自www.cnblogs.com/gyrgyr/p/11206405.html
今日推荐
周排行