|
iterator_to_arrayCopy the iterator into an array Description
array iterator_to_array(Traversablearray
$iterator , bool $preserve_keys = true )Copy the elements of an iterator into an array. Parameters
Return Values
An array containing the elements of the Changelog
Examples
Example #1 iterator_to_array example
The above example will output: 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" } |