Blogger Information
Blog 4
fans 0
comment 0
visits 2927
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
PHP数组
忻的一年的博客
Original
605 people have browsed it
<?php
$a=['app','book'];
$b=array('app','book'); //数组
$c=array('学生'=>['xiaoming','xiaowang'],'老师'=>['zhulaoshi','wanglaoshi']) ;//二维数组
$d=array('学生'=>array('xiaoming','xiaowang'),'老师'=>array('zhulaoshi','wanglaoshi')) ;
// print_r($a);
// print_r($b);
// print_r($c);
// print_r($d);
foreach($c as $k=>$val){
foreach ($val as $key => $value) {    //二维数组遍历
 echo $key;
 echo ",";
 echo $value;
 echo ",";
 echo "|";
 # code...
}
}
?>

 

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