Showing 7 of 1,216 result(s)
The examples that follow will use integers in all arrays. Assuming the following array and example: The value of $collapsedArray would then be: It is important to note that the collapse method is not recursive. This can be observed in the...
The collapse method will also work on collections. There is no special syntax required to use collections with the collapse method: The value of $collapsedArray would then be: Nested collections can also be collapsed: The value of collapsed array...
The array_collapse function is a shortcut to calling Arr::collapse . This function is declared in the global namespace.
The signature of the where method is:
In the following example, we will examine how to compare just the values of the arrays. Assume we have an array of numbers, from 0 to 100 : $numbers = range(0, 100); An array of all numbers less than or equal to 10 can be created like so:...
The array_where function is a shortcut to calling Arr::where . This function is declared in the global namespace.
The signature of the wrap method is: