Snippets

Flattening A PHP Multidimensional Array

Playing
Flattening A PHP Multidimensional Array
12 mins8 years ago

A couple of methods you can use to flatten a multidimensional array with PHP. The first method looks at a more verbose method of looping through array items and self calling a function/method, and the second looks at using standard PHP classes to make it a bit cleaner.

Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Comments

No coments, yet. Be the first to leave a comment.