PHP: Get the first Key of an Associative Array
PHP: Get the first Key of an Associative Array
I am not completely sure about it, but I somehow don’t think that I’ve ever needed to get the first key of an associative array using PHP before. Sure, a simple problem with a simple solution, but seeing as I needed to Google this one, I’m jotting down the answer here for future reference.
So, our example for the day then: Given the following array, print out the first key.
[php]$months = array( ‘…
View On WordPress















