<?php $firstname = "Bill"; $lastname = "Gates"; $age = "60"; $result = compact("firstname", "lastname", "age"); print_r($result); ?>
==============================================
アレイ([FIRSTNAME ] =>ビル[姓] =>ゲイツ[年齢] => 60)
PHP配列一緒にいくつかの変数、対応する変数名と値
おすすめ
転載: www.cnblogs.com/gyrgyr/p/11206405.html
ランキング