how to push associative array in php code example
Example 1: array_push php
<?php
$cesta = array("laranja", "morango");
array_push($cesta, "melancia", "batata");
print_r($cesta);
?>
Example 2: php array push
array_push ( array &$array [, mixed $... ] ) : int
or
$array[] = $var;
Example 3: php add to existing associative array
$a1=['aa'=>'123' , 'bb'=>'454'];
$a1 = array_merge( $a1 , ['a'=>1,'b'=>2] ) ;