How do I get max(); to display the highest value number rather than just "Array"?
<p>max($caption);<br />
gives me this:<br />
Array</p>

<p>$caption is defined here:  </p>

<pre><code>$i = "0";  
   while ($i &lt; $count) {  
      list($oldCaption, $year, $order) = explode("-", $galleryDirectory[$i]);  
      $caption[$year][$order] = str_replace("_", " ", "$oldCaption");  
      echo $year; //debug
      echo "&lt;br /&gt;";
      $i++;  
   }
</code></pre>

<p>$year comes out to be<br />
2008<br />
2009<br />
2009</p>

<p>so how do I get max($caption); to give me the value of 2009 rather than Array?</p>

<p>also i would put the whole code, but when i tried that it turned out messy. but I will try again, so you guys can see the whole pictures</p>
