PHP配列一緒にいくつかの変数、対応する変数名と値

<?php
$firstname = "Bill";
$lastname = "Gates";
$age = "60";

$result = compact("firstname", "lastname", "age");

print_r($result);
?>

==============================================
アレイ([FIRSTNAME ] =>ビル[姓] =>ゲイツ[年齢] => 60)

おすすめ

転載: www.cnblogs.com/gyrgyr/p/11206405.html