Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.