Blogger Information
Blog 13
fans 0
comment 0
visits 10480
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
6月4日作业 1. 创建一个二维数组,进行遍历,并分析结果
PHPer博客
Original
871 people have browsed it

<?php
$datas=[
   ['name'=>'老公','age'=>30,'stature'=>'177cm','weight'=>'70kg'],
   ['name'=>'老婆','age'=>29,'stature'=>'166cm','weight'=>'50kg'],
   ['name'=>'小孩','age'=>1,'stature'=>'88cm','weight'=>'15kg']
];

echo "<h2>家庭人员信息</h2>";

foreach($datas as $data){
   echo '<hr>';
   foreach ($data as $key=>$value){
       echo '<p>'.$key.' : '.$value.'</p>';
   };
}



zuoye2.jpg

Correction status:Uncorrected

Teacher's comments:
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