Problem sorting two arrays, both ordered by the first one
Posted: Thu Mar 03, 2005 1:45 pm
Hi again.
I'm working with an array that have the sales in cash for a store and another array that have the names for the salesmen.
I wanted to do a ranking for the cash. So I did a multisort:
thinking I would get the ranked values for the cash and the corresponding salesmen in the other array in the same order of the first array, BUT, I didnt.
I did get the ranked values for the cash, but I got the values for the $salesmen array in alphabetical order! so, I think i cant use multisort. I been reading some sort functions in php.net, but i dont seem to find one that do the job.
Anyone can help?
I'm working with an array that have the sales in cash for a store and another array that have the names for the salesmen.
I wanted to do a ranking for the cash. So I did a multisort:
Code: Select all
multisort($sales,$salesmen)I did get the ranked values for the cash, but I got the values for the $salesmen array in alphabetical order! so, I think i cant use multisort. I been reading some sort functions in php.net, but i dont seem to find one that do the job.
Anyone can help?