remember that not every short code is good. in your example there is no one way to get into this else if
because you say
if($var === "hello")
{
"Hi";
}
else
{
"Goodbye";
}
else if($var ==="howdie")
{ "how"; }
else
{ "Goodbye"; }
Wrong, you cannot use two else
accordingly. you have a structure for your conditions, such as
if (condition) {
} elseif (condition) {
} else {
}
same thing in triple operators
(condition) ? /* value to return if first condition is true */
: ((condition) ? /* value to return if first condition is true */
: /* value to return if condition is false */ );
(
, )
.
, , , . if else if
,
.