How to take the current key from array? PHP
I want to take the current key in the array. I know the function current($array) but it take the value.开发者_Python百科
Rules:
- I cannot use in any loop.
- Without array_flip().
- I need function.. if you can mix the function current($array) it'll be great!
Thank you.
You mean something like key() ?
http://nl.php.net/manual/en/function.key.php
精彩评论