Re: How to implode multi-dimensional arrays?
| From: | Jonathan Sharp | Date: | Thu, 14 Nov 2002 22:57:57 +0000 |
| Subject: | Re: How to implode multi-dimensional arrays? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-124522@lists.php.net to get a copy of this message | ||
Dope...try this instead...
foreach ( $array AS $a )
{
$string .= implode("\t", $a) . "\n";
}
-js
Jonathan Sharp wrote:
> foreach( $array AS $d2 )
> {
> $string .= implode('', $d2) . "\n";
> }
>
> -js
>
>
> René Fournier wrote:
>
>>The docs don't seem to discuss this... Or maybe I'm looking in the wrong
>>place. Anyway, I want to convert a multidimensional array back to the
>>tab-delimited format it began as ("\t" separating fields, "\n"
>>seperating records/rows)... Any ideas???
>>
>>....Rene
>>
>>---
>>René Fournier,
>>rene@smartslitters.com
>>
>>Toll-free +1.888.886.2754
>>Tel +1.403.291.3601
>>Fax +1.403.250.5228
>>www.smartslitters.com
>>
>>SmartSlitters International
>>#33, 1339 - 40th Ave NE
>>Calgary AB T2E 8N6
>>Canada
>>
>>
>
>
>
>