Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4648

Re: Fast/Easy way to extract a column from multi-dimensional array?

Message-ID <1442130.yjh1QK7NA3@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Organization PointedEars Software (PES)
Date 2012-01-27 22:55 +0100
Subject Re: Fast/Easy way to extract a column from multi-dimensional array?
Newsgroups comp.lang.php
References <jfv06v01hoa@news6.newsguy.com> <jfv2pk$aot$1@news.albasani.net> <1574609.VNBv5SFTvI@PointedEars.de>
Followup-To comp.lang.php

Followups directed to: comp.lang.php

Show all headers | View raw


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@94.75.214.39>

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Fast/Easy way to extract a column from multi-dimensional array? John Drako <jbravo556@gmail.removethis.com> - 2012-01-27 15:08 -0500
  Re: Fast/Easy way to extract a column from multi-dimensional array? "J.O. Aho" <user@example.net> - 2012-01-27 21:50 +0100
    Re: Fast/Easy way to extract a column from multi-dimensional array? "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-27 22:49 +0100
  Re: Fast/Easy way to extract a column from multi-dimensional array? Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2012-01-27 21:52 +0100
    Re: Fast/Easy way to extract a column from multi-dimensional array? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-27 22:42 +0100
      Re: Fast/Easy way to extract a column from multi-dimensional array? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-27 22:55 +0100
      Re: Fast/Easy way to extract a column from multi-dimensional array? Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2012-01-27 23:49 +0100
  Re: Fast/Easy way to extract a column from multi-dimensional array? Jeff North <jnorthau@yahoo.com.au> - 2012-01-28 13:52 +1100
    Re: Fast/Easy way to extract a column from multi-dimensional array? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-28 21:28 +0100
  Re: Fast/Easy way to extract a column from multi-dimensional array? Arno Welzel <usenet@arnowelzel.de> - 2012-01-28 09:49 +0100
    Re: Fast/Easy way to extract a column from multi-dimensional array? John Drako <jbravo556@gmail.removethis.com> - 2012-01-29 13:54 -0500

csiph-web