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

Mail sending is slow on server
Why mail is taking time to be send on apache-linux server

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Why will this program not run if the variables are not global?
Hey guys I have a kind of perplexing situation that is probably simple, but I can't seem to understa

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer a

line breaks in between fetched file names
Hi,

I have this code:
Code: <?php
if($dir = opendir('files')){
while (($f

upload control not working with update panel
Hi,

I am working with Asp.Net FileUpload control with ajax update panel,

if i use the

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page wi

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