Re: How do I split an alphabetical list (array) into A-M and N-Z?
| From: | Joshua E Minnie | Date: | Wed, 03 Jul 2002 15:22:36 +0000 |
| Subject: | Re: How do I split an alphabetical list (array) into A-M and N-Z? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-105220@lists.php.net to get a copy of this message | ||
Try looking up in the manual about array_slice
(http://us2.php.net/manual/en/function.array-slice.php).
--
Joshua E Minnie/CIO
josh@acsurf.net
Phone: 616.276.9690
Fax: 616.342.8750
Nextel: 616.862.2847
"Don't work for recognition, but always do work worthy of recognition."
"Daevid Vincent" <daevid@daevid.com> wrote:
> Anyone have a function that will take an alphabetical list of names (in
> an array already) and split it into two 'chunks' (arrays) A-M and N-Z?
>
> So, let's say I have:
>
> Abby Road
> BobbyCraft
> Darren's doodads
> Farenheit 456
> generic name
> MyCom.com
> Ninety Nine
> NoCo
> O U 1
> O'reilly Publishing
> Oracle
> PSI
> Test Company
>
> I want to end up with one array/chunk that has (A-M):
>
> Abby Road
> BobbyCraft
> Darren's doodads
> Farenheit 456
> generic name
> MyCom.com
>
> And the other that contains (N-Z):
>
> Ninety Nine
> NoCo
> O U 1
> O'reilly Publishing
> Oracle
> PSI
> Test Company