open_in_new
content_copy
$foo = your_value; $bar = ($foo == 1) ? "1" : (($foo == 2) ? "2" : "other"); echo $bar;