php获取数组的键值

<?php
header ( "Content-type: text/html; charset=utf-8" );

    $info["aa"]=1;
    $info["bb"]=2;
    $info["cc"]=3;
    $info["dd"]="abcd";
    
    foreach($info as $k=>$val)
    {
        echo "键:".$k."  值:".$val;
        echo "<br>";
    }
?>

 

posted @ 2014-10-23 16:12  ♀影☆响  阅读(2136)  评论(0编辑  收藏  举报