Home Tutorial Php Phparray php array append


Share on Google+Share on Google+
php array append
Posted on: October 27, 2009 at 12:00 AM
This section demonstrates the use of the append function of the php array

  • append function is used to add the element in the last position of the array
  • It adds the element to the array created by the ArrayObject class

Example of PHP Array Append Function


$ar1=new ArrayObject(array("aaa","bbb","ccc"));

foreach ($ar1 as $a)

echo $a." ";


echo "<br>after appending <br> ";

foreach ($ar1 as $a)

echo $a." ";



Related Tags for php array append:

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: October 27, 2009

Recommend the tutorial

Advertisements Advertisements