PHP BY EXAMPLE
quote generator
slideshow generator
photo gallery generator
photo paginator gallery generator
address book
basic blog
paypal generator
sc simple cms

qg PG2 : PHOTO GALLERY GENERATOR



Example

pg2banner

PHP Code

<?php
$targetpage = "index.php";
$start=0;
$limit=0;
$folder=opendir("photos");
$pic_types = array("jpg","jpeg","gif","png","pdf");
$index=array();
while($file = readdir($folder)) 
{
if(in_array(substr(strtolower($file),strrpos($file,".")+1),$pic_types))
	{
		array_push($index,$file);
	}
}
$limit = (int)(count($index))+1;
?>

<?php
closedir($folder);
?>

PHP Code Explanation

Tweet Follow      © 2013 | webcula.com (all rights reserved) | php by example