Hi, all -- I have an array like
$a =
array
(
'key' =>
array
(
'title' => "Topic Title",
'content' => "Topic Content",
),
...
) ;
and I'd like to sort the whole thing not on the keys but on the titles.
It sounds like array_multisort should do exactly what I want, but I can't
seem to get it to work. For a given source array kind of like
$a
bookmark
How To Bookmark
This is all about bookmarking.
add
Adding Pictures
Let's talk about pictures.
zebra
Caught You Here
This is about zebras but it has a surprise title.
then I want
$a
add
Adding Pictures
Let's talk about pictures.
zebra
Caught You Here
This is about zebras but it has a surprise title.
bookmark
How To Bookmark
This is all about bookmarking.
after sorting.
Will array_multisort sort on an arbitrary key of a multidimensional
array, or does it just sort multidimensional arrays but only in key
index priority?
Barring that, I imagine I'd have to either ensure that the array is
constructed in the proper order or make an index of titles => keys so
that I could sort that and then pull the key out to display the list.
Bleah. Once again it would probably be easier to just lay out a DB
schema!
TIA & HAND
:-D
--
David T-G * There is too much animal courage in
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
pgp00000.pgp
Description: PGP signature

