Blogger Information
Blog 250
fans 3
comment 0
visits 321682
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
函数list()在数组中的使用方式
梁凯达的博客
Original
970 people have browsed it

//list()可以将一组索引数组的单元赋值给一组变量
 //list()把每个赋值给list内的变量
 //而且这个索引数组必须从0开始连续的索引数组

 $arr = array(1,2,3,4,5);
 //list()的使用格式为:
 //list($a,$b,$b,$d) = $arr
 //将某个变量赋值到函数当中
 list($a,$b,$c,$d) = $arr;
 //此时$a,$b,$c,$d都拿到了对应的四个数组的值;
 echo $a;
 echo $b;
 echo $c;
 echo $d;
 echo '<hr />';

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post