Getting Unique Values in Multidimensional Array PHP -


i have array similar this:

array(5) { [0]=> string(2) "32" [1]=> string(2) "67" [2]=> string(19) "2013-07-15 15:56:28" [3]=> string(1) "1" [4]=> string(4) "fail"} array(5) { [0]=> string(2) "32" [1]=> string(2) "89" [2]=> string(19) "2013-09-15 13:50:34" [3]=> string(1) "2" [4]=> string(4) "pass"} array(5) { [0]=> string(2) "37" [1]=> string(2) "55" [2]=> string(19) "2013-07-15 16:36:12" [3]=> string(1) "1" [4]=> string(4) "fail"} array(5) { [0]=> string(2) "39" [1]=> string(2) "92" [2]=> string(19) "2013-08-15 15:46:20" [3]=> string(1) "1" [4]=> string(4) "pass"} 

the first value displays content id, second score, third date, fourth attempt number (no limit), , fifth result. want print these values in browser, if there more 1 attempt, want print 1 highest score. can't seem working, appreciated.

the way can achieve is:

  • 1st: group results content id.
  • 2nd: descending order sub-array score using usort
  • 3rd: display 1st sub-array user each content id.

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -