PHP - Get key name of array value

前端 未结 9 1570
暗喜
暗喜 2020-11-29 16:53

I have an array as the following:

function example() {
    /* some stuff here that pushes items with
        dynamically created key strings into an array */         


        
9条回答
  •  情歌与酒
    2020-11-29 17:42

    Yes you can infact php is one of the few languages who provide such support..

    foreach($arr as $key=>$value)
    {
    
    }
    

提交回复
热议问题