sort string beginning at index?
- From: Stan McCann <me@xxxxxxxxxxxxx>
- Date: 29 Sep 2005 11:43:11 -0700
I need some recommendations as to how to go about sorting a string not
from the beginning of the string, but from a given index into the
string. I am reading a data file into an array using file(), then
looping through the string which contains fields seperated by |. Do I
have to explode each individual record to sort them using
array_multisort()? What I was hoping for was something like sort
($array, SORT_STRING, 15) where 15 is the index into the string to sort
on instead of starting at 0. I've been digging through the docs
reading about sort and usort and the others but nothing looks like it
will work short of using up time and memory creating a multidimensional
array to sort.
--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
http://alamo.nmsu.edu/ There are 10 kinds of people.
Those that understand binary and those that don't.
.
- Follow-Ups:
- Re: sort string beginning at index?
- From: Oli Filth
- Re: sort string beginning at index?
- From: NC
- Re: sort string beginning at index?
- Prev by Date: Re: affiche d'une nouvelle page .php ou .html sans l'entete
- Next by Date: Re: sort string beginning at index?
- Previous by thread: Pass values through a PHP form emailer
- Next by thread: Re: sort string beginning at index?
- Index(es):
Relevant Pages
|