PHP 2 Flashcards
1
Q
What does
$a=array(“red”,”green”,”blue”);
array_pop($a)
do?
A
Delete last element of an array
2
Q
What does
$a=array(“red”,”green”,”blue”);
array_shift($a)
do?
A
array_shift() deletes first element of an array.
To return this use array_unshift()