Re: [php] - alphabetizing
| From: | Josh G | Date: | Mon, 22 Jan 2001 03:57:53 +0000 |
| Subject: | Re: [php] - alphabetizing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35946@lists.php.net to get a copy of this message | ||
Just build an assosciative array like so
$arr["person1"] = "string1";
$arr["person2"] = "string2";
$arr["person3"] = "string3";
$arr = asort($arr);
this should do what you're looking for.
Gfunk - http://www.gfunk007.com/
I sense much beer in you. Beer leads to intoxication, intoxication to
hangovers, and hangovers to... suffering.
----- Original Message -----
From: "Ray Iftikhar" <iftikhar@pacbell.net>
To: "Php-General List" <php-general@lists.php.net>
Sent: Monday, January 22, 2001 2:52 PM
Subject: [PHP] [php] - alphabetizing
> Hello,
> I was just typing a msg and accidentally hit send before I could
> finish.. sorry..
>
> I have a file, its contents are as follows:
>
> Name of person1, string1
> Name of person2, string2
> Name of person3, string3
> Name of person4, string4
> Name of person5, string5
>
> I want to alphabetize the list from A-Z (using the first column as the
> primer key). I was planng on using an array, but I would have to use a 2
> dimensional array and I am not too swift on those..
>
> Thanx,
> Ray..
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>