The index is automatic, the indexes are 0, 1, 2, etc. nothing special.
But the key to the database is auto-incremented. meaning the index directly correlates to the key of the database. So after the sort, I can do a query and retrieve the info on that row with that key.
But I think that once you sort(), it changes the index, therefore I would lose that correlation between the index and the key of the database therefore making the array quite useless…so my question is how do I keep that correlation while still sorting so that the highest value goes to the top?
And then after that’s successful, how do I sort through an array like that?
Thanks so much for your help and patience,
Binny
I think what you want is
asort()orarsort(). According to the documentation forasort(),arsort()sorts in the reverse direction.