I have an array of store numbers in order.
$store_counter[$x]
It holds the value of store numbers for a retail chain, in order. Not all store numbers are consecutive.
$store_counter[0]=1
$store_counter[1]=4
$store_counter[2]=5
$store_counter[3]=6
$store_counter[4]=9
$store_counter[5]=11
etc.
I have sales in another array:
$tot_store_sales_w[0]=259332.55
$tot_store_sales_w[4]=379789.74
$tot_store_sales_w[5]=579929.39
$tot_store_sales_w[6]=280547.38
$tot_store_sales_w[9]=493220.34
$tot_store_sales_w[11]=382709.29
I want to change $store_counter to list the stores in order of their volume.
e.g. in the above example I want $store_counter to read:
$store_counter[0]=5
$store_counter[1]=9
$store_counter[2]=11
$store_counter[3]=4
$store_counter[4]=6
$store_counter[5]=1
My experience with arrays is slim. I would appreciate some help or directions on how to do this.
Thank you.
Brian