I am integrating an API and in some cases bonus field return value N/A and I want not to show N/A on the page.If the field has any text other than N/A then it shows the text.
I tried this:
if(trim($value) != "N/A" && !is_null($value))
{
echo $value;
}
But the above condition is not working.
Can anyone help me to make it working.
Thanks in advance.
One answer from the oneliners club:
empty($value) or $value == 'N/A' or print($value);
"print" will only be reached if the $value is not set and is not "N/A"