Jump to content

getimagesize loop?


amwd07

Recommended Posts

Hello

 

Not sure if this is possible or I am going about this is the correct way

 

<?php
list($width, $height, $type, $attr) = getimagesize("images/makers/16/tn/anthologia-mis16-10.jpg");
echo "Image width " .$width;
echo "<BR>";
echo "Image height " .$height;
echo "<BR>";
echo "Attribute " .$attr;
?>

 

what I would like to do is calulate all the image widths for the following recordset so each user would output a different value

 

for example there is 16 images for mis_id 16 so the total width would be 2080px

the reason I need this value is because I have a image scroller but this requires a width: as each members gallery will be different

 


<?php
$colname_gallery = "-1";
if (isset($_GET['mis_id'])) {
  $colname_gallery = $_GET['mis_id'];
}
mysql_select_db($database_mis, $mis);
$query_gallery = sprintf("SELECT * FROM members_gallery WHERE user_id = %s", GetSQLValueString($colname_gallery, "int"));
$gallery = mysql_query($query_gallery, $mis) or die(mysql_error());
$row_gallery = mysql_fetch_assoc($gallery);
$totalRows_gallery = mysql_num_rows($gallery);

$galleryimage=mysql_result($gallery,$i,"gallery_image");
?>

Link to comment
https://forums.phpfreaks.com/topic/69759-getimagesize-loop/
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.