Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get first key of array

$colors = array(2=>"blue",3 =>"green",1=>"red");
$firstValue = reset($colors); //blue
$firstKey = key($colors); //2
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #key #array
ADD COMMENT
Topic
Name
9+8 =