I need to come up with a code that would give me the same effect as in the code below
$var1 = "some value";
$var2 = "another value";
$var3 = 'third value and' . if (isset($var2)) { $var2 } . ' rest of the value';
The above code will result in the following error
syntax error, unexpected 'if' (T_IF)
is there a workaround for something like this? Thanks.