These are the slides from a talk given at WordCamp Los Angeles 2016.
You’ve heard of the good ol’ school PHP loops. You have your “for” loops, your “foreach” loops, your “while” loops, your “fruit” loops… Well maybe not that last one!
As a WordPress developer, you use arrays and loops all the time. They’re an essential part of your developer toolbox. But do you know everything about them?
PHP has a wealth of array functions. They’re used by PHP experts to make their life easier. They let you reduce the amount of PHP code you need. This helps prevent bugs and makes your code more maintainable.
You’ll learn about functions like array_filter, array_map and array_reduce. All within the context of regular WordPress work. By the end of this talk, loops won’t look at you the same way ever again.
You can read the companion article at: https://carlalexander.ca/php-array-functions-instead-loops/