The ternary conditional operator is a useful way of avoiding inconvenient if statements. They can even be used in the middle of a string concatenation, if you use parentheses.
Example:
if ( $wakka ) {
$string = 'foo' ;
} else {
$string = 'bar' ;
}
The above can be expressed like the following:
$string = $wakka ? 'foo' : 'bar' ;
If $wakka is true, $string is assigned 'foo', and if it's false, $string is assigned 'bar'.
To do the same in a concatenation, try:
$string = $otherString . ( $wakka ? 'foo' : 'bar' ) ;