Is my return missing something?
return $var === 'apple' ? 'A' : $var === 'banana' ? 'B' : 'C';
There is only one issue is when $var
is ='apple'
is doesn't return A
it returns B
I can definitely see the $var printing apple
So why not returning A
For me the statement is correct anyone have any idea?