PHP

This site does uses PHP mainly to include repeating HTML and to count the number of photos in each country or region.

PHP examples

Includes

<?php include("folder_nav_portfolio.htm"); ?>

Photo count

<?php
  $mydir = basename(getcwd());
  $directory = "/lib/images/travels/$mydir/";
  if (glob("$directory*.jpg") != false)
  {
    $filecount = count(glob("$directory*.jpg"));
    echo $filecount;
  }
  else
  {
    echo 0;
  }
?>

My PHP

PHP Toolkit

local_airport