max() problem


Posted on 16th Feb 2014 07:03 pm by admin

I have a while loop to get image names.
Code: $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
Code: $array = array($height);
echo max($array);does not work?

No comments posted yet

Your Answer:

Login to answer
154 Like 11 Dislike
Previous forums Next forums
Other forums

Multiple Do / While Statements?
I'm still very new to PHP, and running in to a problem when trying to execute a do/while loop inside

Opening Multiple Files/Links in Order.
I want to open links in order/one-by-one and check each for a specific string.

Example:
I

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

mysql_affected_rows() usage
Possibly a MySQL issue, but the function that is not behaving in the anticipated way is a PHP functi

Calculating a rating by adding number of points and dividing by number of items
I have a site that users can post links to files to download. They can rate these files on a 1-5 sca

Program with calculate Meteorologic measurements
Hello I'm a beginner and I want to make a program with calculate Meteorologic measurements:
ba

php unable to sent email
Hi, guys, I try to send a email through php but unfortunately the mail unable to sent. Here is my co

Material Master Update through BAPI - Follow up material not updated
Hi Experts,

I am updating the material master through a custom transaction using the BAPI

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

Getting PHP to ammended the selected in option field
Hey Guys

thanks for everyones help so far. This site and its users are oozing awesomness.

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash