Imploding nested arrays

Posted by Alex Zylman on Stack Overflow See other posts from Stack Overflow or by Alex Zylman
Published on 2010-05-26T06:23:21Z Indexed on 2010/05/26 6:31 UTC
Read the original article Hit count: 231

Filed under:

Hey guys,

If I have an array structured like this:

$array[index]['first_name']
$array[index]['last_name']

Is there an easy way to implode it into something like first_name last_name,first_name last_name, etc. for all the indices?

Implode didn't seem to do what I wanted for something like this. Currently I'm just looping over the whole thing, but it's a SIGNIFICANT bottleneck.

© Stack Overflow or respective owner

Related posts about php