iterator_to_array

PHP 5 >= 5.1.0, PHP 7, PHP 8
iterator_to_array - Copy the iterator into an array
Manual
Code Examples

Example #1 iterator_to_array example

Result: 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" }
PHP Version:


Function iterator_to_array:

Standard PHP Library (SPL) Functions

Most used PHP functions