Question
structure of arrays sort
Hi, I have a structure of arrays as follows.
The Structure is session.cart
my arrays are session.cart.foodname[ ]
session.cart.comments[ ]
session.cart.name[ ]
session.cart.price[ ]
All of these arrays correspond to each other, so session.cart.name[1] may be John, who ordered a cheeseburger (session.cart.foodname[1]). So i need to sort these by the persons name and have the other 3 arrays sort with them, so they still correspond to each other. Can anyone help me with this? Ive looked over the structsort function but cant figure out how to apply it to a structure of arrays. Thanks for the help.
The Structure is session.cart
my arrays are session.cart.foodname[ ]
session.cart.comments[ ]
session.cart.name[ ]
session.cart.price[ ]
All of these arrays correspond to each other, so session.cart.name[1] may be John, who ordered a cheeseburger (session.cart.foodname[1]). So i need to sort these by the persons name and have the other 3 arrays sort with them, so they still correspond to each other. Can anyone help me with this? Ive looked over the structsort function but cant figure out how to apply it to a structure of arrays. Thanks for the help.