Hello Readers ,
If we want to insert more records at the end of an array then their is function called array_push() that we can use.
Example :
If we have an existing array array("red","green"); and we want to insert two more values at the end of this array then you can use the below code.
<?php
$a=array("red","green");
array_push($a,"blue","yellow");
print_r($a);
?>
Output:
Array ( [0] => red [1] => green [2] => blue [3] => yellow )
0 Comment(s)