|
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]
|