In this tutorial learn Remove the first value from an array in php.
TUTORIAL
OUTPUT DEMO
function removeFirstelement($array)
{
array_shift($array);
return $array;
}
TUTORIAL
<?php
$array = Array
(
'3' => 10,
'2' => 2,
'5' => 'Nakiya',
);
/**
* Remove the first value from an array.
*/
function removeFirstelement($array)
{
array_shift($array);
return $array;
}
var_dump(removeFirstelement($array));
array(2) {
[0]=>
int(2)
[1]=>
string(6) "Nakiya"
}
No comments:
Post a Comment