Tag Archive: push

Mar 21

Array Push and Pop

Array_Push : Push one or more elements onto the end of array Syntax: array_push ( $array ,  $value1 [, $value2, $value3,… ] ) array_push() treats array as a stack, and pushes the passed variables onto the end of array. Simple example: $arr[]=$val; In Above Example return the new number of element in array. Example: $arrval=array(“test”,”test1″); array_push($arrval,”test3″,”test4″); print_r($arrval); Output Array ( [0] => test [1] => test1 …

Continue reading »