- $arr=array('id'=>'2','friendship'=>'Your life is too valuable to throw away','comes'=>' I\\'m gonna say yes--yes to love','num'=>563,'make'=>'make up our minds to take the world as we find it');
- while($key=key($arr))
- {
- echo $key.'---'.$arr[$key].'<br>';
- next($arr);
- }
- // 注意:只能遍历关联数组
- //该片段来自于http://www.codesnippet.cn/detail/150720149991.html
来源: http://www.codesnippet.cn/detail/150720149991.html