Skip to content

Instantly share code, notes, and snippets.

@nabil-boag
nabil-boag / gist:8537228
Created January 21, 2014 09:46
PHP Function for array zip merge. Merges two arrays like a zipping. Uneven sized arrays get items appended to the end.
/**
* Merges two arrays like a zipping. Uneven sized arrays get items
* appended to the end.
*
* @param array $a An array to merge
* @param array $b Another array to merge
* @return array An array of merged values
*/
function array_zip_merge(array $a, array $b) {
$return = array();