add data to end of array php code example
Example 1: php array push
array_push ( array &$array [, mixed $... ] ) : int
or
$array[] = $var;
Example 2: add object in array php
$myArray = array("name" => "my name");
echo json_encode($myArray);
array_push ( array &$array [, mixed $... ] ) : int
or
$array[] = $var;
$myArray = array("name" => "my name");
echo json_encode($myArray);