Answers for "array_push an array"

PHP
2

array_push php

<?php
$cesta = array("laranja", "morango");
array_push($cesta, "melancia", "batata");
print_r($cesta);
?>
Posted by: Guest on April-26-2020
0

array_push

// The array_push() function inserts one or more elements to the end of an array.

$a=array("red","green");
array_push($a,"blue","yellow");
print_r($a);
Posted by: Guest on August-22-2021

Browse Popular Code Answers by Language