|
| Getting info from array Fra : Christian Borchgrevi~ |
Dato : 24-04-02 18:18 |
|
I have an array with lots of equal integers. Then i want to "convert" this
array to an array with only on occassion of each number.
Eg:
firstArray (1,3,4,3,4,3,3,3,3,2)
My goal:
secondArray(1,2,3,4)
Is this possible somehow?
Thanks
Christian
| |
Nezar Nielsen (24-04-2002)
| Kommentar Fra : Nezar Nielsen |
Dato : 24-04-02 19:22 |
|
"Christian Borchgrevink-Lund" <borchgrevink@yahoo.com> wrote in message
news:3cc6e8ee$0$10874$ba624c82@nntp01.dk.telia.net...
> I have an array with lots of equal integers. Then i want to "convert" this
> array to an array with only on occassion of each number.
...
> firstArray (1,3,4,3,4,3,3,3,3,2)
...
> secondArray(1,2,3,4)
>
> Is this possible somehow?
Yes, just use the force ..err the fine manual:
http://dk.php.net/manual/en/function.array-unique.php
--
Mvh. Nezar Nielsen
Nano - Advanced Simplicity
http://www.nano.dk/
| |
Christian Borchgrevi~ (24-04-2002)
| Kommentar Fra : Christian Borchgrevi~ |
Dato : 24-04-02 19:34 |
|
Thanks
"Nezar Nielsen" <tumpen@fez.dk> wrote in message
news:3cc6f7e4$0$97300$edfadb0f@dspool01.news.tele.dk...
> "Christian Borchgrevink-Lund" <borchgrevink@yahoo.com> wrote in message
> news:3cc6e8ee$0$10874$ba624c82@nntp01.dk.telia.net...
> > I have an array with lots of equal integers. Then i want to "convert"
this
> > array to an array with only on occassion of each number.
> ..
> > firstArray (1,3,4,3,4,3,3,3,3,2)
> ..
> > secondArray(1,2,3,4)
> >
> > Is this possible somehow?
>
> Yes, just use the force ..err the fine manual:
> http://dk.php.net/manual/en/function.array-unique.php
>
> --
> Mvh. Nezar Nielsen
>
> Nano - Advanced Simplicity
> http://www.nano.dk/
>
>
>
| |
|
|