I have two PHP arrays, for example:
- Array of X records containing the wordpress message identifier (in particular order)
- Wordpress Message Array
Two arrays look something like this:
Array One (sorted custom array of Wordpress post IDs)
Array ( [0] => 54 [1] => 10 [2] => 4 )
Array Two (array of Wordpress posts)
Array ( [0] => stdClass Object ( [ID] => 4 [post_author] => 1 ) [1] => stdClass Object ( [ID] => 54 [post_author] => 1 ) [2] => stdClass Object ( [ID] => 10 [post_author] => 1 ) )
I would like to sort an array of Wordpress posts with identifier order in the first array.
I hope this makes sense, and thanks in advance for any help.
Tom
edit: the server is running PHP version 5.2.14
Tisch
source share