I have an array that looks like this:
Array ([0] = & Gt; Hey ([0] = & gt; Hey ([product] => 2003 [date] => 2010-09-15 13:27:35 [status] => 3) [ 1] = & gt; Array [Product] => 2004 [date] => 2010-09-18 13:27:35 [situation] => 1) [2] => Hey ( [Product] = & gt; 2004 [date] = & gt; 2010-09-18 13:27:35 [status] => 6)) [1] = & gt; Array ([0] = & gt; Hey ([product] => 2003 [date] => 2010-09-12 13:27:35 [status] => 1) [1] = & Array ([product] => 2004 [date] => 2010-09-18 13:27:35 [status] => 4) [2] => Array ([product] = & Gt; 2004 [Date] => 2010-09-18 13:27:35 [Status] => 1)) [2] = & gt; Array ([0] = & gt; [1] => Hey ([product] => 2004 [date] => 2010-09-18 13:27:35 [status] => 1) [2] = & Gt; Array ([product] => 2004 [date] => 2010-09-18 13:27:35 [status] => 1))
I want to "collapse" each other dimension array and get the maximum date value and maximum position value. Therefore, the first index will return 2010-09-18 13:27:35 and '6' etc.
In the previous index, the problem with the empty array is even more complex. I want to use this empty array and report it as the maximum date and condition.
Thank you in advance!
Thanks for looking at everyone I know this.
$ date = array (); $ Position = array (); $ Availability = array (); Foreign currency ($ key = & gt; set as $ value) {foreach ($ value as $ value2) {if (isset ($ value2 [1])) {$ date [$ key] [] = $ value2 [ 1]; $ Position [$ key] [] = $ value 2 [2]; } And {$ date [$ key] [] = '2022-09-18 13:27:35'; $ Position [$ key] [] = '0'; }} $ Availability [$ key] = array (maximum ($ date [$ key]), minute ($ position [$ key])); }
Comments
Post a Comment