See array for example: here
Basically, I want to find the max() for array[][‘time’] in that array. I can figure it out if I loop through it, but I was hoping there was a more elegant solution.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Think
array_reduceif you want to compute some single value iteratively over an array:Or you could make use of a utility function like:
which would be used like:
It’s more general purpose and could be used for other similar things.