Name
each
Synopsis
array each(array array
)
Creates an array containing the keys and values of the element
currently pointed at by the array’s internal
pointer. The array contains four elements: elements with the keys
0
and key
from the
element contain the key of the element, and elements with the keys
1
and value
contain the
value of the element.
If the internal pointer of the array points beyond the end of the
array, each( )
returns false
.
Get Programming PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.