PHP: Hypertext Preprocessor - Basics
Friday, September 14th, 2007Some useful snippits of PHP code.
Include - Include a external document within the PHP file.
<?php include 'filename.type' ?>
Variables - Set and recall a variable.
<?php
$varname = "Variable contents";
echo $varname;
?>
If statement - checking for a null property.
<?php
if ($pagetitle == NULL)
{ echo "Generic Title";
}else{ echo $pagetitle; }
?>
Date\Time - codes.
<?php echo date('F j, Y'); ?>
Camera world now has a semi-fully-functioning search form!