如何在键值对数组的后面追加多一对键值对
比如
$arr1= array (
"a" => '1',
"b" => '2',
"c" => '3',
"d" => '4');
将他变成
$arr2=array (
"a" => '1',
"b" => '2',
"c" => '3',
"d" => '4',
"f" => '5',);
要怎么样做。才能在键值对数组里面添加新的键值对.
直接赋值不可以么!!!这么easy
直接 $array['f'] = $数组;
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号