简单教程
提交运行
代码编辑器:
<?php $firstname = "Peter"; $lastname = "Griffin"; $age = "41"; $name = array("firstname", "lastname"); $result = compact($name, "location", "age"); print_r($result);
运行结果: