<?php
$list=array("nancy","robert","john");
//print_r( array_change_key_case($list,CASE_UPPER));
print_r(array_chunk ($list,2));
$list=array_chunk ($list,2);
echo"<br>";
echo"<br>";
echo $list[0][1]; //value for second key on first array
echo"<br>";
echo $list[1][0]; //value for first key on second array
?>
Array ( [0] => Array ( [0] => nancy [1] => robert ) [1] => Array ( [0] => john ) )
robert
john
the list array will be splited in 2 arays
No hay comentarios:
Publicar un comentario