RE: [PHP] Re: Push an Array, Comma separated.
| From: | Ford, Mike | Date: | Wed, 01 Jul 2009 12:29:39 +0000 |
| Subject: | RE: [PHP] Re: Push an Array, Comma separated. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-294790@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Louie Miranda [mailto:lmiranda@gmail.com]
> Sent: 01 July 2009 04:19
> To: php-general@lists.php.net
> Subject: Re: [PHP] Re: Push an Array, Comma separated.
>
> This is what I did. And it worked.
>
> $saveFiles = array();
> $arrSize=sizeof($saveFiles);
> for ($number = 0; $number < $arrSize; $number++) {
> $saveFilesDump = "$saveFiles[$number], ";
> echo "$saveFiles[$number], ";
> }
>
> File1.txt, File2.txt, File3.txt,
Oh! You mean:
$saveFilesDump = implode(', ', $saveFiles);
I think everyone was confused by you using the word "push", which means something else
entirely. (I know I was.)
Cheers!
Mike
--
Mike Ford, Electronic Information Developer,
C507, Leeds Metropolitan University, Civic Quarter Campus,
Woodhouse Lane, LEEDS, LS1 3HE, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm