downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ArrayIterator::asort> <ArrayIterator
[edit] Last updated: Fri, 25 May 2012

view this page in

ArrayIterator::append

(PHP 5 >= 5.0.0)

ArrayIterator::appendAjoute un élément

Description

public void ArrayIterator::append ( mixed $value )

Ajoute une valeur comme dernier élément.

Avertissement

Cette fonction n'est pas documentée et seule la liste des arguments est disponible.

Liste de paramètres

value

La valeur à ajouter.

Valeurs de retour

Aucune valeur n'est retournée.

Notes

Note:

Cette méthode ne peut être appelée lorsque ArrayIterator se réfère à un objet.

Voir aussi



add a note add a note User Contributed Notes ArrayIterator::append
lenye01 at gmail dot com 10-Feb-2011 08:11
we can append values after the given array,the index is begin from 0, for example:

<?php
$b
= array('name'=>'mengzhi','age'=>'22','city'=>'shanghai');
$a = new ArrayIterator($b);
$a->append(array('home'=>'china','work'=>'developer'));
var_dump($a);
?>

then output:
object(ArrayIterator)#1 (1) { ["storage":"ArrayIterator":private]=> array(4) { ["name"]=> string(7) "mengzhi" ["age"]=> string(2) "12" ["city"]=> string(8) "shanghai" [0]=> array(2) { ["home"]=> string(5) "china" ["work"]=> string(9) "developer" } } }

 
show source | credits | sitemap | contact | advertising | mirror sites