Answers for "php use array values"

PHP
0

get element by index array php

$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-30-2020

Browse Popular Code Answers by Language