'b');//$item 为一个数组 $a[1] = $item; $a[1]"/> 'b');//$item 为一个数组 $a[1] = $item; $a[1]">

Home  >  Article  >  Backend Development  >  php的一个数组有关问题

php的一个数组有关问题

WBOY
WBOYOriginal
2016-06-13 13:11:29842browse

php的一个数组问题
如果一个数组$a[1]=$item(为一个数组),那么还能a[1]["var"][]=$item吗???

------解决方案--------------------
当然可以

PHP code
$item = array('a' =>'b');//$item 为一个数组
$a[1] = $item;
$a[1]["var"][] = $item;

print_r($a); <div class="clear">
                 
              
              
        
            </div>
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