Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php multi elseif statement ternary

$foo = 1;
$bar = ($foo == 1) ? "1" : (($foo == 2)  ? "2" : "other");
echo $bar;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #multi #elseif #statement #ternary
ADD COMMENT
Topic
Name
8+5 =