php array add with key code example
Example 1: php array push with key
<?php
$a=array("a"=>"red","b"=>"green");
array_push($a,"blue","yellow");
print_r($a);
?>
Example 2: php array push key value
<?php
$image[0] = $image[0].','.$filename;
?>
<?php
$a=array("a"=>"red","b"=>"green");
array_push($a,"blue","yellow");
print_r($a);
?>
<?php
$image[0] = $image[0].','.$filename;
?>