PHP array pus code example
Example 1: php append element to array
array_push($cart, 13);
Example 2: php array push
array_push ( array &$array [, mixed $... ] ) : int
or
$array[] = $var;
Example 3: add object in array php
$myArray = array("name" => "my name");
echo json_encode($myArray);