[suspicious - maybe spam] [suspicious - maybe spam] Re: [PHP] How do I get the first element's key of an array of objects?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Chris W. Parker wrote:

Read www.php.net/array_keys and you shall have your answer.

From the php docs:

<?php

 $array = array(0 => 100, "color" => "red");
 print_r(array_keys($array));

?>

Will output.

Array
(
[0] => 0
[1] => color
)



Duh! Yes, I replied a little too fast on that one.

/Mattias



--
More views at http://www.thorslund.us

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux