【发布时间】:2013-06-22 05:31:07
【问题描述】:
如何在没有索引的多维数组中添加键值对在php中
例如:
<?php
$GLOBALS['app_list_strings']['ip_list']=array (
'192.168.1.51' => 'server1',
// i have to add key and value pair here just like above
);
?>
【问题讨论】:
-
问题出在哪里?
-
可能你的解决方案在这里:stackoverflow.com/questions/1355072/…
-
“没有索引”是什么意思?键不等同于索引吗?
-
$GLOBALS['app_list_strings']['ip_list']['new_index']="newVal"