PHP sorting arrays by a Key
Hi anyone know how to sort a multidimensional array by a key in php?
the data goes
Array [0] ( [id] => 1 [link] => link [weight] => 10 )
Array [1] ( [id] => 2 [link] => link [weight] => 1 )
Array [2] ( [id] => 3 [link] => link [weight] => 8 )
Array [3] ( [id] => 4 [link] => link [weight] => 10 )
I want to sort the array we shall call $links
by weight decending.
Looked everywere and i can't work it out any help out be great.
__________________
CaShY
|