Jump to content

Can't get re-order function to work.


Anidazen

Recommended Posts

Hey guys.

 

I'm being massively held up by being unable to get a function right to sort my rows.

 

I have an array called prices. Format is as such:

 

prices[sellerID][priceID]

 

 

 

I want to be able to sort it by the price element. Been trying to get a function that will take a new priceID , and will give me an ordered list of sellerID s for that price. Lowest to highest, preferably with undefined coming last.

 

Eg. to return an array like "5,1,4,0,3,2", with every element referring to sellerID, as ordered by priceID.

 

 

 

 

This is really causing me some grief... I just can't wrap my head round it at all

 

If anyone can help me I'd really appreciate it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.