Jump to content

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

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.