When I do -
echo "Hello ". (true) ? 'World' : 'XYZ';
The output - World
instead of Hello World
. But when -
$person = (true) ? 'World' : 'XYZ';
echo "Hello ".$person;
The output - Hello World
which is expected.
Don't understand why this behave like this! Is it expected?
is same as
You need: