$people=array('name','sex','nation','brith'); |
<?php $people=array('name','sex','nation','birth'); echo $people[2]; ?> |
<?php $peoples=array('xm'=>'name','xb'=>'sex','mz'=>'nation','cs'=>'birth'); echo $peoples['cs']; ?> |
$people[0]='name'; $people[1]='sex'; $people[2]='nation'; $people[3]='brith'; |
$peoples['xm']='name'; $peoples['xb']='sex'; $peoples['mz']='nation'; $peoples['cs']='birth'; |
<?php $people=array('name','sex','nation','birth'); for ($i=0;$i<4;$i++) echo "$people[$i] "; ?> |
<?php $people=array('name','sex','nation','birth'); foreach($people as $xiangmu) echo $xiangmu; ?> |
新闻热点
疑难解答