I have a string:
$string = '0';
And in an echo statement like this:
echo ($string ? 'true':'false');
I want the '0'
to be true. It currently is false.
Is there a way to adjust the echo statement? I know I can for example add a space in the string:
$string = ' 0';
And it will be true. But I am hoping for a solution that doesn't require me adjusting the string.