Web IT
asked on
sort by secondary array
I have this array .
how can I sort by first name in php (current;y it's sorted by id) ?
how can I sort by first name in php (current;y it's sorted by id) ?
[1611] => Array
(
[first_name] => Daniel
)
[1610] => Array
(
[first_name] => Batman
)
[1609] => Array
(
[first_name] => Abraham
)
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
If you use the strcmp() function with the following
Open in new window
You will get the followingOpen in new window
if you use strcasecmp() you getOpen in new window
This is because lexicographically capital 'Z' comes before lower case 'a'.