$foo = 1; $bar = ($foo == 1) ? "1" : (($foo == 2) ? "2" : "other"); echo $bar;
(something) ? 'foo' : ((somethingElse) ? 'bar' : ((bla) ? 'pool' : ((xxxxx) ? 'coffe' : '')));