Fixed an error in the function 'extract_column'

This commit is contained in:
Alejandro Gallardo Escobar 2015-07-16 13:27:11 +02:00
parent 95d0794ae0
commit cbd4b60aca
1 changed files with 1 additions and 1 deletions

View File

@ -2457,7 +2457,7 @@ function array2XML($data, $root = null, $xml = NULL) {
function extract_column ($array, $column) {
$column_is_arr = is_array($column);
return array_map(function($item) {
return array_map(function($item) use ($column_is_arr, $column) {
if ($column_is_arr) {
return array_reduce($column, function($carry, $col) use ($item) {
$carry[$col] = $item[$col];