468,785 Members | 1,623 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,785 developers. It's quick & easy.

sort array

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
1 2035
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.

Similar topics

4 posts views Thread by its me | last post: by
4 posts views Thread by Brett | last post: by
40 posts views Thread by Elijah Bailey | last post: by
7 posts views Thread by ritchie | last post: by
21 posts views Thread by yeti349 | last post: by
5 posts views Thread by Jan Smith | last post: by
1 post views Thread by Marcus Kwok | last post: by
48 posts views Thread by Alex Chudnovsky | last post: by
4 posts views Thread by Santosh Nayak | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.