Appends the value with ArrayObject::append in PHP

Description

The following code shows how to appends the value with ArrayObject::append.

Example


/*from  w  w w.  j  ava  2 s  .  co m*/
<?php
    $arrayobj = new ArrayObject(array('first','second','third'));
    $arrayobj->append('fourth');
    $arrayobj->append(array('five', 'six'));
    var_dump($arrayobj);
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone