Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

only find .png, .jpg, and .jpeg files

  • Loading branch information...
commit 7e25560067da437477f9de22047407d16bc350a9 1 parent 0ad2164
Baylor Rae' authored September 19, 2012

Showing 1 changed file with 1 addition and 7 deletions. Show diff stats Hide diff stats

  1. 8  demo.php
8  demo.php
... ...
@@ -1,12 +1,6 @@
1 1
 <?php
2 2
 
3  
-$raw_files = glob('*.*');
4  
-$files = array();
5  
-
6  
-foreach( $raw_files as $r ){
7  
-  if( preg_match( '/\.(?:png|jpg|jpeg)$/' , $r ) )
8  
-    $files[] = $r;
9  
-}
  3
+$files = glob('*.{png,jpg,jpeg}', GLOB_BRACE);
10 4
 
11 5
 ?><!DOCTYPE html>
12 6
 <html lang="en">

0 notes on commit 7e25560

Please sign in to comment.
Something went wrong with that request. Please try again.