<?php
$hour = date('g'); // Your Hour
$greeting = ($hour < 12) ? "Good morning!" : "Good afternoon!"; // Your if/else
echo $greeting; // now echo it out!
?>
OK so the way it works
$[VarName] = ([If]) ? [IfTrue] : [IfFalse];
so are variable name is
$greeting
our if statement is
$hour < 12 don't forget this must be in brackets ()
our "ifTrue" is
Good morning!
and our "ifFalse" is
Good afternoon!
very simple stuff
Questions/Comments/Request/PM Me