PHP grimoire

Helpful PHP snippets.

Flattening arrays in PHP

A short & easy way to flatten two-dimensional arrays, and a slightly more verbose one to handle arbitrarily nested arrays.