Re: Fast/Easy way to extract a column from multi-dimensional array? [message #176836 is a reply to message #176834] |
Fri, 27 January 2012 21:55 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Thomas 'PointedEars' Lahn wrote:
> array_map() it is, but one should not rely on that the array cursor is at
> the first element. Since the OP is passing MYSQLI_ASSOC, they should use
>
> $recordIds = array_map(
> create_function('$e', 'return $e["RecordID"]'),
^
I forgot the trailing `;' in the function code. In PHP it is mandatory.
> $arr
> );
>
> for one-time use or […]
PointedEars
--
Sometimes, what you learn is wrong. If those wrong ideas are close to the
root of the knowledge tree you build on a particular subject, pruning the
bad branches can sometimes cause the whole tree to collapse.
-- Mike Duffy in cljs, <news:Xns9FB6521286DB8invalidcom(at)94(dot)75(dot)214(dot)39>
|
|
|