FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Fast/Easy way to extract a column from multi-dimensional array?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Fast/Easy way to extract a column from multi-dimensional array? [message #176837 is a reply to message #176834] Fri, 27 January 2012 22:49 Go to previous messageGo to previous message
Thomas Mlynarczyk is currently offline  Thomas Mlynarczyk
Messages: 131
Registered: September 2010
Karma:
Senior Member
Thomas 'PointedEars' Lahn schrieb:
>> array_map( 'current', $array )
>
> array_map() it is, but one should not rely on that the array cursor is at
> the first element.

True. And I just remembered that the reset() function conveniently
returns the first element of the array, thus:

array_map( 'reset', $array )

But I admit that a custom function would be more flexible.

Greetings,
Thomas


--
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: approaches to PHP-based application interface?
Next Topic: php+html mixup in displaying multidimensional array in html tables
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 17:59:56 GMT 2024

Total time taken to generate the page: 0.04175 seconds