You are here: Re: Separate text « PHP « IT news, forums, messages
Re: Separate text

Posted by Pro N00b on 05/15/05 11:40

Bertman wrote:
> Lo,
>
> I have a variable $groups. I can contain a single number like $groups=1. But
> It also can contain more numbers like $groups=1,4,3. I need to separate the
> numbers and put them in a kind off array.
> Something like:
> $groups[1] = 1
> $groups[2] = 4
> $groups[3] = 3
>
> Anybody an idea ?

I wouldn't make a exception if there's only one number, just always use
an array.
$groups = array(1); // first example
$groups = array(1, 4, 3); // second example

But I don't really get your problem?

 

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

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