Hi guys, I am trying to echo some output based on a variable in my PHP.

I can code an if statement to echo the output if the variable is not empty if (!$variable=='') but my problem comes if the variable returns the value "N/A". If it returns N/A I do not want the output to be printed.

So is there a way to say:

If $variable is not blank, but is also not "N/A"
echo 'output';

i am not sure if this is what you are looking for:

if ( $variable !== '' && $variable !== 'N/A' ) {
  //put code here if the variable is not blank and not equal to 'n/a'
}

You beauty, that's the badger!

Thanks ever so much.