You are here: Re: Comma separated list from array? « All PHP « IT news, forums, messages
Re: Comma separated list from array?

Posted by MattMika on 06/06/06 22:44

On Wed, 7 Jun 2006 00:19:38 +0200, "Rik" <luiheidsgoeroe@hotmail.com>
wrote:

>MattMika wrote:
>> How can I properly comma separate the list below?
>>
>> <?
>> while (list($key,$value) = each($Sizes)) {echo "$value, ";}
>>>
>>
>> As you can see this will put a comma after the last value, I'd like to
>> have no comma after the last value. What functions/technique can I
>> accomplish this with?
>
>
>echo implode(', ',$Sizes);
>
>Grtz,

LOL, I knew about implode but was trying to figure it out inside the
while loop, whatta dumbass, no need to do that...

Thnx
Matt Mika

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация