A Guide to PHP Array Filtering, Searching, Ordering and Modification
Working with arrays in PHP or any other language can sometimes be difficult, especially when you need…
Working with arrays in PHP or any other language can sometimes be difficult, especially when you need…
title tags pluck array,beginner Retrieves all of the values for a given key. Use array_map() to map each object…
title tags all array,beginner Returns true if the provided function returns true for all elements of an array, false otherwise. Use array_filter() and count() to check if $func returns true for…
title tags any array,beginner Returns true if the provided function returns true for at least one element of an array, false otherwise. Use array_filter() and count() to…
title tags average math,beginner Returns the average of two or more numbers. Use array_sum() for all the values in $items and…
title tags clampNumber math, beginner Clamps $num within the inclusive range specified by the boundary values $a and $b. If $num falls within the…
title tags compose function,intermediate Return a new function that composes multiple functions into a single callable. Use array_reduce() to…
title tags countVowels string,regexp,beginner Returns number of vowels in the provided string. Use a regular expression to…
title tags curry function,advanced Curries a function to take arguments in multiple calls. If the number of…
title tags drop array,beginner Returns a new array with $n elements removed from the left. Use array_slice() to remove $n elements from the…