PHP if-not-null-statement not working for me?

  • Thread starter Thread starter Damien
  • Start date Start date
D

Damien

Guest
That's invalid.

It is:

IF (isset($row['menu_id'])
echo "this should work";

Also, you can use simple:

if($row['menu_id'])

IF NOT is invalid.

Hope that helps.
 
I need to ECHO something if the variable is NOT null, but can't get it to work.

I can get it to work if it IS null by doing this:
IF (is_null($row['menu_id']))
echo "This works";

But if I put a NOT in front of it, it fails:
IF NOT (is_null($row['menu_id']))
echo "This does not work";

How can I get the "NOT NULL" check to work?
 
Back
Top