1
2<?php
3$queue = array("orange", "banana");
4array_unshift($queue, "apple", "raspberry");
5print_r($queue);
6?>
7 Array
8(
9 [0] => apple
10 [1] => raspberry
11 [2] => orange
12 [3] => banana
13)
14
15
1
2<?php
3 $a=array("a"=>"red","b"=>"green");
4 array_unshift($a,"blue");
5 print_r($a);
6// result : Array ( [0] => blue [a] => red [b] => green )
7
8?>
9
1
2<?php
3
4 $a=array("a"=>"red","b"=>"green");
5array_unshift($a,"blue");
6print_r($a);
7
8?>
9
1$cola = array("naranja", "banana");
2array_unshift($cola, "manzana", "frambuesa");
3print_r($cola);
4
5Array
6(
7 [0] => manzana
8 [1] => frambuesa
9 [2] => naranja
10 [3] => banana
11)