$config = array('ddsd'=>13,'fdasfda'=>'fdasfsda','fdasf'=>'fdsafdsa')
$num = 0;
for ($i = 0;$i < count($config); $i++)
{
$num += 1;
echo key($config).'=>'.current($config).'//'.$num.'<br />';
next($config);
}
$config = array('ddsd'=>13,'fdasfda'=>'fdasfsda','fdasf'=>'fdsafdsa')
$num = 0;
for ($i = 0;$i < count($config); $i++)
{
$num += 1;
echo key($config).'=>'.current($config).'//'.$num.'<br />';
next($config);
}
本文标题:for循环关联数组取重要值
本文链接:https://www.haomeiwen.com/subject/lpdxcqtx.html
网友评论