{ and } not properly aligned in tom and vineesh's codes. It should be like
Code:
if (CONDITION) {
// do some thing if true
} else {
// do another thing
}
It is OK, just coding style, it is better to follow proper coding style from the beginning.
Variable names are perfect.
Updated code for
http://php.flashwebhost.com/vineesh/...n_making_5.php
Code:
<?php
$rain = 'eeeee';
if ($rain == 'yes') {
echo 'It will rain today.';
} else if ($rain == 'no') {
echo 'It will not rain today.';
} else {
echo 'huh...what is this ?';
}
Bookmarks