is it possible to write shorthand if, ELSE IF, else statement for php.
if / else is clear, but is there a shorthand way when I want to use elseif (other than the switch)?
if ($typeArray == 'date'){ echo 'date'; } else if($typeArray == 'time'){ echo 'time'; } else { echo 'text'; }
They did not find a good else answer, where there is an abridged version for nested if statements, including elseif.
greetings timmi
source share