Insert New Element Into Array

Insert value into array PHP

PHP array_push() Function Main Tips

  1. The array_push() function inserts elements into the end of an array .
  2. You can as many values , as you like.
  3. Your added elements will always have numeric keys, even if your array has string keys.
  4. Returns the elements number in the array .
  5. Newly introduced in PHP4.