Jump to content

max() problem


StefanRSA

Recommended Posts

I have a while loop to get image names.

$imagequery = mysql_query("SELECT * FROM ad_image WHERE user='$user' AND ad='$adnr' ORDER BY `picorder` ASC")or die(mysql_error());
$totpics = mysql_num_rows($imagequery);
while ($imageset = mysql_fetch_array($imagequery)){
$order= $imageset['picorder'];
$image= $imageset['image'];
$title= $imageset['title'];
$imagesize = getimagesize($modx->config['base_path'].'ad_images/'.$image);
$height = $imagesize[1];
}

 

How do I get the highest number of $height as

$array = array($height);
echo max($array);

does not work?

Link to comment
https://forums.phpfreaks.com/topic/182642-max-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.