Re: array problem need help quick
| From: | George Nicolae | Date: | Sat, 30 Nov 2002 09:11:16 +0000 |
| Subject: | Re: array problem need help quick | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17229@lists.php.net to get a copy of this message | ||
try to implement your sort function (bubble or quick) and you change both
arrays.
--
Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com - Professional Web Design
www.PaginiWeb.com
"Damouse" <damouse@ntlworld.com> wrote in message
news:001f01c298f8$f3c3c500$3700a8c0@DaMouse...
I need help with a array problem I want one array to be sorted and another
taking its same number order e.g.
$ar1[0] == "marmite"; $ar2[0] == 10;
$ar1[1] == "jam"; $ar2[1] == 11;
$ar1[2] == "beef"; $ar2[2] == 7;
$ar1[3] == "cabbage"; $ar2[3] == 0;
$ar1[4] == "ick"; $ar2[4] == 5;
sort($ar2,SORT_NUMERIC); and then make sure that the values of $ar1 are with
there vote number counterparts in $ar2 so now
$ar2[0] == 0; $ar1[0] == "cabbage";
please help
Ensign Baker
HCO Officer
USS Atlantis