Why it won't work? Appears Parse error: syntax error, unexpected ':' ... on line 7
$a = 0; $b = 1; $c = 3; $d = 4;
if ($a == $b):
if ($b == $c) {
// something
}
else:
$c = $a;
endif;
But if i change it to (just added else statement):
$a = 0; $b = 1; $c = 3; $d = 4;
if ($a == $b):
if ($b == $c) {
// something
} else {
// something
}
else:
$c = $a;
endif;
It works fine.
Why is that? isn't it a PHP bug? Or there is a rule about if...else i should know?
Anyway, i'm using PHP 5.3.3 version.