Lines Matching refs:array

2 Test array_unshift() function : usage variations - two dimensional arrays for 'array' argument
7 * arrays and also sub-arrays within the two-dimensional array for $array argument.
11 echo "*** Testing array_unshift() : two dimensional arrays for \$array argument ***\n";
16 // two-dimensional array to be passed to $array argument
17 $two_dimensional_array = array(
19 // associative array
20 array('color' => 'red', 'item' => 'pen', 'place' => 'LA'),
22 // numeric array
23 array(1, 2, 3, 4, 5),
26 array('a' => 'green', 'red', 'brown', 33, 88, 'orange', 'item' => 'ball')
29 /* Passing the entire $two_dimensional_array to $array */
32 // returns element count in the resulting array after arguments are pushed to
33 // beginning of the given array
35 var_dump( array_unshift($temp_array, $var) ); // whole 2-d array
37 // dumps the resulting array
41 // returns element count in the resulting array after arguments are pushed to
42 // beginning of the given array
44 var_dump( array_unshift($temp_array, $var, "hello", 'world') ); // whole 2-d array
46 // dumps the resulting array
49 /* Passing the sub-array within the $two_dimensional_array to $array argument */
52 // returns element count in the resulting array after arguments are pushed to
53 // beginning of the given array
55 var_dump( array_unshift($temp_array, $var) ); // sub array
57 // dumps the resulting array
61 // returns element count in the resulting array after arguments are pushed to
62 // beginning of the given array
64 var_dump( array_unshift($temp_array, $var, "hello", 'world') ); // sub array
66 // dumps the resulting array
72 *** Testing array_unshift() : two dimensional arrays for $array argument ***
74 array(4) {
78 array(3) {
87 array(5) {
100 array(7) {
118 array(6) {
126 array(3) {
135 array(5) {
148 array(7) {
166 array(4) {
177 array(6) {