I don't think that you're likely to find a one liner that's not going to reduce 
readability.

Kind regards,
Keri Henare
---------------------------------------------------
[e]  [email protected]
[w]  kerihenare.com
[m]  (+64) 021 874 552

PLEASE NOTE: I check my email 3 times per day and will respond at these 
intervals.  For anything urgent please ring me.
---------------------------------------------------

On 26/04/2010, at 11:31 AM, chris burgess wrote:

> What's the tersest way to turn this -
> 
>  $temp = array(
>    array( 'value' => 'one', ),
>    array( 'value' => 'two', ),
>    array( 'value' => 'three' ),
>  ) ;
> 
> into this -
> 
>  $str = 'one,two,three' ;
> 
> I'm using
> 
>        foreach ( $temp as $t ) {
>          $t2[] = $t['value'] ;
>        }
>        $str = implode(',', $t2);
> 
> ... but my brain is nagging me that there's a one-liner.
> 
> What am I missing?
> 
> -- 
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to