Hello friends, Today we will show PHP array push key value. In this example we will learn php array push key value pair. we will explain step by step example of php push key and value in array.
Here, we will show how to push both value and key in php, php push function is used to push both value and key in array, how to use array_push() function in php.
array_push(array, value1, value2, ...);
<?php $a=array("a"=>"red","b"=>"green"); array_push($a,"blue","yellow"); print_r($a); ?>
I hope you understand of php push array key and value and it can help you…