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

search for in the

SplFixedArray::valid> <SplFixedArray::setSize
[edit] Last updated: Fri, 10 Feb 2012

view this page in

SplFixedArray::toArray

(PHP 5 >= 5.3.0)

SplFixedArray::toArrayRetourne un tableau PHP à partir d'un tableau à taille fixe

Description

public array SplFixedArray::toArray ( void )

Retourne un tableau PHP à partir d'un tableau à taille fixe.

Liste de paramètres

Cette fonction ne contient aucun paramètre.

Valeurs de retour

Retourne un tableau PHP à partir d'un tableau à taille fixe.

Exemples

Exemple #1 Exemple avec SplFixedArray::toArray()

<?php
$fa 
= new SplFixedArray(3);
$fa[0] = 0;
$fa[2] = 2;
var_dump($fa->toArray());
?>

L'exemple ci-dessus va afficher :

array(3) {
  [0]=>
  int(0)
  [1]=>
  NULL
  [2]=>
  int(2)
}



add a note add a note User Contributed Notes SplFixedArray::toArray
There are no user contributed notes for this page.

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