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

Code Review - SQL and Insertion Attacks (Warning: Not for Newbs)
Hey guys,

Its been a while, I know. Use to love coming here to answer peoples questions, but

Custom array sort? asc then desc
Any ideas how I could sort this array? I've been trying for a while. Maybe with usort, but I have no

Help pulling in 'id' with "read more" link
I'm trying to create snippets of my articles in the cms I'm creating, and then have them redirect to

scandir clients directory
hi,
how can i scandir the clients directory? i need a script that when i click a button it will u

Text to picture Generator
Hello, i have found this script and it works really good^^ But i have one problem, i would like to c

question about stripslashes and real_escape_string
im cleaning up an old app that I wrote fixing some of the vulernabilities from attacks.

I hav

image upload script not working with png
The basic process of this php code is to take the submitted file, convert it to a small JPG thumbnai

a dificult string search
Hi I don't know a way around this. I want the user to input a password, but to make it a bit complca

mysql_query returning boolean instead of mysql ressource
Hi,

I seem to have a weird issue with the php command mysql_query. I pass 2 arguments the que

need to add "sizes" to shopping cart
Hey guys, I am trying to figure out a way to add a "size" selector on to this bit of code.

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