On top of my head, I would probably code them like this:
$str = '';
foreach ( $temp as $i => $t ) {
if ($i > 0) $str .= ',';
$str .= $t['value'];
}
You can make them one line if you want :-D
On Mon, Apr 26, 2010 at 11:53 AM, chris burgess <[email protected]> wrote:
> On Mon, Apr 26, 2010 at 11:39 AM, Berend de Boer <[email protected]> wrote:
>>>>>>> "chris" == chris burgess <[email protected]> writes:
>> chris> What's the tersest way to turn this
>> You're clearly not being paid per line of code :-)
>
> Fortunately not, I suspect *I* might end up paying if that was the deal ;)
>
> Thanks all! I'll live with the foreach for now then.
>
> --
> NZ PHP Users Group: http://groups.google.com/group/nzphpug
> To post, send email to [email protected]
> To unsubscribe, send email to
> [email protected]
--
Blue Horn Ltd - System Development
http://bluehorn.co.nz
--
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]