Attualmente ho un problema in PHP, in cui desidero ordinare questi post in base alla data di creazione in modo che possano essere visualizzati in ordine decrescente. Ho cercato una funzione PHP per farlo ma non ho avuto fortuna.Ordinamento di matrici all'interno di un array in PHP da datetime
C'è una soluzione facile a questo? Qualsiasi idea sarà molto apprezzato :)
array
0 =>
array
'post_id' => string '1' (length=1)
'user_id' => string '3' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
1 =>
array
'post_id' => string '2' (length=1)
'user_id' => string '2' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
2 =>
array
'post_id' => string '3' (length=1)
'user_id' => string '5' (length=1)
'post' => string 'this is a post' (length=14)
'created' => string '2012-04-05 20:11:38' (length=19)
È questo proveniente da un Banca dati? Se no, perché no? – NullUserException
da dove viene caricato questo array? – hjpotter92
Sì, sembra sospetto come le righe di query MySQL. 'ORDER BY creato DESC' –