Wednesday, August 08, 2007

PHP supports an alternative syntax for the various control structures.

Way 1

if ($check == 0) {
echo 'True!';
} else {
echo 'False!';
}
?>

Way 2

if ($check == 0):
echo 'True!';
else:
echo 'False!';
endif;
?>

No comments: