daily pastebin goal
56%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $dir_jpg = "../wp-content/uploads/newspaper/jpg/";
  2.     $dir_pdf = "../wp-content/uploads/newspaper/pdf/";
  3.  
  4.         $images = glob($dir_jpg."*.*");
  5.         $pdfs = glob($dir_pdf."*.*");
  6.  
  7.         $array = array_combine($images, $pdfs);
  8.  
  9.         foreach($array as $image => $pdf){
  10.           echo '<ul>';
  11.             echo '<li>';
  12.               echo '<a href="'.$pdf.'" target="_blank"><img src="'.$image.'" height="100" width="100" /></a>';
  13.             echo '</li>';
  14.           echo '</ul>';
  15.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top