STRING // Turn a 1D array into a comma-seperated string function comma_sep($array) { global $stack; $stack = ""; $comma_print = function($item) { $GLOBALS['stack'] = $GLOBALS['stack'] . ", " . $item; }; array_map($comma_print, $array); $stack = preg_replace('/^, /', '', $stack); return $stack; } ?>