dc_jt Posted June 21, 2009 Share Posted June 21, 2009 Please see the array below. You will notice there is a date added. What I need to do is work out what the earliest and latest date is from this array, therefore in this example the earliest will be 2009-06-18 09:12:28 and the latest will be [date_added] => 2009-06-18 15:29:35 What is the best way to work this out? Is it by sorting the array by date_added (how do I do this?) or is there a way to simply work it out? Here is the array: Array ( [37] => Array ( [out_new] => Array ( [0] => Array ( [application_id] => 23 [case_id] => 30 [date_added] => 2009-06-18 14:23:37 [consumer_id] => 17 [introducer_id] => 37 [master_id] => 1 [introducerName] => introducer1 ) [1] => Array ( [application_id] => 26 [case_id] => 32 [date_added] => 2009-06-18 09:12:28 [consumer_id] => 17 [introducer_id] => 37 [master_id] => 1 [introducerName] => introducer1 ) ) ) [43] => Array ( [out_complete] => Array ( [0] => Array ( [application_id] => 28 [case_id] => 34 [date_added] => 2009-06-18 15:29:35 [consumer_id] => 13 [introducer_id] => 43 [master_id] => 38 [introducerName] => introducer6 ) ) ) ) Thanks. Link to comment https://forums.phpfreaks.com/topic/163130-sorting-array-by-dategetting-earliest-date/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.