I feel like there must be simpler way to do this, but sometimes I want two pieces of text at different points if one case is true.
Here, I'm wrapping stuff in a link in two different ways. They both seem long.
<?=($x)?"<a href='$x'>":""?> stuff <?=($x)?"</a>":""?>
or
$y = "stuff";
if ($x)
$y = "<a href='$x'>$y</a>";
print $y;
you can do this with ternary operator
echo (isset($x))?"<a href='$x'>$y</a>":$y;