Quote:
Originally posted by freddie
Bira there is no "strict php coding" rulebook that says one must enclose if/then segments withing curly braces.
i.e.
Code:
if ($x)
if ($y)
if ($z)
echo "YES";
is the same as and as valid as
Code:
if ($x) {
if ($y) {
if ($z) {
echo "YES";
}
}
}
|
Not to mention the first makes your code shorter.

Not to argue, bira, but I always use
if ($whatever): instead of
if ($whatever) { because I am forever forgetting to close the curly braces. So maybe I'm just lazy

but I prefer to not use the braces.