<?php
$arrays = array (
0 => array(
"location" => "Breakwater",
"bsid" => "105c"
),
1 => array(
"location" => "Breakwater",
"bsid" => "105c"
),
2 => array(
"location" => "Breakwater",
"bsid" => "105c"
),
3 => array(
"location" => "Whateverelse",
"bsid" => "105c"
)
);
function array_column($array, $key) {
$column = array();
foreach($array as $origKey => $value) {
if (isset($value[$key])) {
$column[$origKey] = $value[$key];
}
}
return $column;
}
var_dump($column);
- Output for 5.0.4 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45
- Notice: Undefined variable: column in /in/GCTg4 on line 30
NULL
- Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.3
- Notice: Undefined variable: column in /in/GCTg4 on line 30
NULL
preferences:
222.78 ms | 1395 KiB | 135 Q