|
iterator_to_arrayCopy the iterator into an array Beschreibung
array iterator_to_array
( Traversable
$iterator
[, bool $use_keys = true
] )Copy the elements of an iterator into an array. Parameter-Liste
Rückgabewerte
An array containing the elements of the Changelog
Beispiele
Beispiel #1 iterator_to_array example
<?phpDas oben gezeigte Beispiel erzeugt folgende Ausgabe:
array(4) {
["recipe"]=>
string(8) "pancakes"
[0]=>
string(3) "egg"
[1]=>
string(4) "milk"
[2]=>
string(5) "flour"
}
array(4) {
[0]=>
string(8) "pancakes"
[1]=>
string(3) "egg"
[2]=>
string(4) "milk"
[3]=>
string(5) "flour"
}
|