Answers for "how to insert array value in php"

PHP
2

php add element to array

<?php
$stack = array("orange", "banana");
array_push($stack, "apple", "raspberry");
?>
Posted by: Guest on October-12-2020
5

php add item to array

<?php
  $z = ['me','you', 'he'];
  array_push($z, 'she', 'it');
  print_r($z);
?>
Posted by: Guest on June-02-2020

Code answers related to "how to insert array value in php"

Browse Popular Code Answers by Language