Answers for "php array get index of key"

PHP
4

get first key of array php

$firstKey = array_key_first($array);
Posted by: Guest on September-11-2020
2

php array get value at index

$array = array('foo' => 'bar', 33 => 'bin', 'lorem' => 'ipsum');
$array = array_values($array);
echo $array[0]; //bar
echo $array[1]; //bin
echo $array[2]; //ipsum
Posted by: Guest on October-01-2020

Code answers related to "php array get index of key"

Browse Popular Code Answers by Language