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

Posted by Rik on 06/06/06 22:19

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,
--
Rik Wasmus

 

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

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