•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 391,662 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,850 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 177 | Replies: 1
![]() |
•
•
Join Date: Sep 2007
Posts: 13
Reputation:
Rep Power: 1
Solved Threads: 0
Hi all,
Array
( [0] => Array ( [AssessmentFormItem_VC] => 1.1 [Item_ID] => 5792 )
[1] => Array ( [AssessmentFormItem_VC] => 1.2 [Item_ID] => 5794 )
[2] => Array ( [AssessmentFormItem_VC] => 2 [Item_ID] => 5795 )
[3] => Array ( [AssessmentFormItem_VC] => 1 [Item_ID] => 5796 )
)
how will i sort this array by AssessmentFormItem_VC???
Output should be
Array
(
[3] => Array ( [AssessmentFormItem_VC] => 1 [Item_ID] => 5796 )
[0] => Array ( [AssessmentFormItem_VC] => 1.1 [Item_ID] => 5792 )
[1] => Array ( [AssessmentFormItem_VC] => 1.2 [Item_ID] => 5794 )
[2] => Array ( [AssessmentFormItem_VC] => 2 [Item_ID] => 5795 )
)
thanks
Array
( [0] => Array ( [AssessmentFormItem_VC] => 1.1 [Item_ID] => 5792 )
[1] => Array ( [AssessmentFormItem_VC] => 1.2 [Item_ID] => 5794 )
[2] => Array ( [AssessmentFormItem_VC] => 2 [Item_ID] => 5795 )
[3] => Array ( [AssessmentFormItem_VC] => 1 [Item_ID] => 5796 )
)
how will i sort this array by AssessmentFormItem_VC???
Output should be
Array
(
[3] => Array ( [AssessmentFormItem_VC] => 1 [Item_ID] => 5796 )
[0] => Array ( [AssessmentFormItem_VC] => 1.1 [Item_ID] => 5792 )
[1] => Array ( [AssessmentFormItem_VC] => 1.2 [Item_ID] => 5794 )
[2] => Array ( [AssessmentFormItem_VC] => 2 [Item_ID] => 5795 )
)
thanks
•
•
Join Date: Nov 2007
Location: Bangalore, India
Posts: 3,098
Reputation:
Rep Power: 8
Solved Threads: 238
You can use array_multisort. More on array_multisort here .
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*
*PM asking for help will be ignored*
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Array access advice breach broadband business code combo cult of the dead cow daniweb data data protection data transfer database drive dropdownlist encryption europe forensic forensics fun google government hacking hard hardware help hitachi hp industrial espionage information internet it linux mobile module net news payment services privacy protection reuse search security storage terabyte tutorials and more tv web wikipedia
- GUI buttons Inventory Part 5 (Java)
- Assembler n00b. Need Help Please. (Assembly)
- selection sorting issues (C)
- Very New to java, skeleton of program given (Java)
Other Threads in the PHP Forum
- Previous Thread: updating a table if an option in dropdown is selected
- Next Thread: how can admin control the messages in message board



Linear Mode