lets say we have code
$somestring = "amazing text" . $something . "lol";
Is it possible somehow to add $something part only when some
$myvar == true
but without doing:
if ($myvar)
$somestring = "amazing text" . $something . "lol";
else
$somestring = "amazing text" . "lol";
something inline like
$somestring = "amazing text" . if($myvar) $something . "lol";
It would be pretty nice.
Documentation