By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,967 Members | 1,684 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,967 IT Pros & Developers. It's quick & easy.

sort array

P: n/a
i got 2 array one holds the actual data n another is user generated
sort order... how to sort array #1 according to array #2???? array
shld be sorted according to sortorder

Array #1
(
[0] =Array
(
[id] =1
[sortorder] =2
[name] =Windows XP
)

[1] =Array
(
[id] =2
[sortorder] =1
[name] =Windows Vista
)

[2] =Array
(
[id] =3
[sortorder] =4
[name] =Mac OSX
)

[3] =Array
(
[id] =4
[sortorder] =>3
[name] =Linux
)

)
Array #2
(
[0] =Array
(
[sortorder] =2
)

[1] =Array
(
[sortorder] =1
)

[2] =Array
(
[sortorder] =4
)

[3] =Array
(
[sortorder] =3
)

)

Feb 24 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
array_multisort (http://au3.php.net/manual/en/functio...-multisort.php)

Hendri Kurniawan

mi******@gmail.com wrote:
i got 2 array one holds the actual data n another is user generated
sort order... how to sort array #1 according to array #2???? array
shld be sorted according to sortorder

Array #1
(
[0] =Array
(
[id] =1
[sortorder] =2
[name] =Windows XP
)

)
Array #2
(
[0] =Array
(
[sortorder] =2
)
)
Feb 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.