Sorting through an array
| From: | Ron Piggott | Date: | Tue, 06 May 2014 03:26:52 +0000 |
| Subject: | Sorting through an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-323241@lists.php.net to get a copy of this message | ||
How can I sort this array alphabetically by “ bibleAnagramWord “ --- keeping it with the same
“ reference “ and “ most_popular_views “ values?
$result = Array
(
[0] => Array
(
[reference] => 10
[bibleAnagramWord] => Faith
[most_popular_views] => 325
)
[1] => Array
(
[reference] => 24
[bibleAnagramWord] => Prayer [most_popular_views] => 270
)
[2] => Array
(
[reference] => 12
[bibleAnagramWord] => Joy
[most_popular_views] => 233
)
[3] => Array
(
[reference] => 4
[bibleAnagramWord] => Forgiveness
[most_popular_views] => 223
)
[4] => Array
(
[reference] => 16
[bibleAnagramWord] => Pentecost
[most_popular_views] => 168
)
[5] => Array
(
[reference] => 91
[bibleAnagramWord] => Last Supper
[most_popular_views] => 146
)
[6] => Array
(
[reference] => 44
[bibleAnagramWord] => Adopted
[most_popular_views] => 144
)
[7] => Array
(
[reference] => 5
[bibleAnagramWord] => Easter
[most_popular_views] => 139
)
[8] => Array
(
[reference] => 214
[bibleAnagramWord] => Rock
[most_popular_views] => 133
)
[9] => Array
(
[reference] => 86
[bibleAnagramWord] => Discipline
[most_popular_views] => 124
)
);
Ron Piggott
www.TheVerseOfTheDay.info