【数组】array_push 函数给数组添加索引
array_push($mo_ban, '标题');
结果是:Array ( [yong_hu] => admin [0] => 标题 )
但我想让结果是:Array ( [yong_hu] => admin [biao_ti] => 标题 )
怎给数组添加元素的时候把索引添加进去呀?
------解决方案--------------------$mo_ban['biao_ti'] = '标题';
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn