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)){
Did you know?Explore Trending and Topic pages for more stories like this.
$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

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

help finding hacking loopholes
i was attacked by a redirect php injection

my pc is clean of viruses

so i figure that

Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th

IIS7 and getimagesize() problem
I have just discovered after hrs of trying to fix a problem where it's coming from. It's to do with

Need help making login verification cleaner...
I use the below to verify user login. I first check the cookie for the id, ip and a unique id. If it

Not adding to db
Hi, I can't figure out why it won't add the record to the database. It's just a simple form to get

Syntax error
hi im having a little trobble with this script
-------------------------------------------------

simple php table loop
Hi all,

I've the following code

<?php // Create category options

Relative path
I have a absolute path to an image - like so: C:/Program Files/Apache Software Foundation/Apache2.2/

Simple MySQL script is not working
Hey guys,

Just familiarizing myself with PHP and MySQL. I am following along in the O'Reilly

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