[suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?
| From: | Mattias Thorslund | Date: | Sat, 09 Apr 2005 05:22:33 +0000 |
| Subject: | [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-212701@lists.php.net to get a copy of this message | ||
Chris W. Parker wrote:
Read www.php.net/array_keys and you shall have your answer.Duh! Yes, I replied a little too fast on that one. /Mattias -- More views at http://www.thorslund.usFrom the php docs:<?php $array = array(0 => 100, "color" => "red"); print_r(array_keys($array)); ?> Will output. Array ( [0] => 0 [1] => color )