Jump to content

Thumbnails


han003

Recommended Posts

This forum is for people to get help with code they have written. Are you looking for someone to do this for you? If so, we can move this to the freelance forum.

 

If you are wanting to do this yourself, then we are willing to help. But, you have to at least make an effort. There are plenty of tutorials out there on this subject. And, there are plenty of posts on this forum where the same question/problem has been raised. In fact, there was one today! Have you read a tutorial or other forum post and having a problem understanding part of it?

 

What have you done already?

Link to comment
https://forums.phpfreaks.com/topic/273469-thumbnails/#findComment-1407389
Share on other sites

THere's my code

I get an image from a folder but some of them are big, like over 1mb, so id like to make just thumbnails and show the thumbnails in the <img> tag, but if you're not willing to help then by all mean put this in the other forum

thank you :)

 

<?php
 $counter = 0;

 echo '<table><tr>';
 foreach(glob("../Pics/Wallpapers/*.*") as $filename){

   if ( $counter%5 == 0){
 echo '</tr><tr><td>';
   } else{
 echo '<td>';
   }

   echo '<div id="thumbs"><div id="image">';
   echo '<a href="'. $filename .'"><img src="'. $filename .'" height="180" width="320" /></a></div>';
   echo '<div id="text"><span>'. filesize($filename) .'</span></div></div>';

   echo '</td>';
   $counter++;
  }
?>

Link to comment
https://forums.phpfreaks.com/topic/273469-thumbnails/#findComment-1407396
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.