在 PHP 中,Codeigniter:我的数组 $phoneList 包含以下内容:
Array
(
[name] => One, Are
[telephonenumber] => 555.222.1111
)
Array
(
[name] => Two, Are
[telephonenumber] => 555.222.2222
)
Array
(
[name] => Three, Are
[telephonenumber] => 555.222.3333
)
我如何列出每个名字?每个号码出来?我是否正确地说我的数组包含三个不同的数组?对于包含数组的数组,这是否正常?
当我执行 print_r($phoneList) 时,我得到以下信息:
Array ( [0] => Array ( [name] => One, Are [telephonenumber] => 555.222.1111 ) [1] => Array ( [name] => Two, Are [telephonenumber] => 555.222.2222 ) [2] => Array ( [name] => Three, Are [telephonenumber] => 555.222.3333 ) )