title: PHP - Get min() / max() value from array
body: <p>I have some array like this</p>
  
  <pre><code>$arr_dt = array();
  
  foreach ($dt as $r){
      $arr_dt[$r-&gt;criteria][$r-&gt;alternative] = $r-&gt;value;
  }
  </code></pre>
  
  <p>How can i get min / max value based on criteria or alternative?</p>
  
  <p>the criteria may have same value, like below </p>
  
  <pre><code>$arr_dt[criteria1][alternative1] = 25;
  $arr_dt[criteria1][alternative2] = 64;
  $arr_dt[criteria1][alternative3] = 46;
  $arr_dt[criteria2][alternative1] = 80;
  $arr_dt[criteria2][alternative2] = 100;
  $arr_dt[criteria2][alternative3] = 25;
  </code></pre>
  
  <p>how can i get max value of criteria 1 and criteria 2.</p>
  
  <p>Thank You very much.</p>