Skip to content

Commit

Permalink
Merge pull request #7 from BaylorRae/patch-1
Browse files Browse the repository at this point in the history
Remove foreach loop in demo.php
  • Loading branch information
Atle Mo committed Sep 19, 2012
2 parents 0ad2164 + 7e25560 commit ca2f570
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions demo.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<?php

$raw_files = glob('*.*');
$files = array();

foreach( $raw_files as $r ){
if( preg_match( '/\.(?:png|jpg|jpeg)$/' , $r ) )
$files[] = $r;
}
$files = glob('*.{png,jpg,jpeg}', GLOB_BRACE);

?><!DOCTYPE html>
<html lang="en">
Expand Down

0 comments on commit ca2f570

Please sign in to comment.