Jump to content

Recommended Posts

I've been googling the net, and searching here, and all the answers I find seem to confuse me more than I was to start with.  I'm hoping some kind hearted soul here can put me on the right path.  For those have been coding PHP for a while this is probably a really easy question...

 

I have 2 variables (they're set from a mysql database and are working just fine) that I'm trying to do an if-then kinda thing on.  Something like:

 

If $subscriber is null and $ppl is not null then do this

If $ppl is null and $subscriber is not null then do this other thing

If $subscriber is null and $ppl is null then do nothing

 

I know how to fill in the "then do this" blank....what I can't seem to figure out is how to compare for "Is Null" or "Is Not Null" and put that in and If-Then-Else kinda thing.

 

Can anyone help me out here?

Link to comment
https://forums.phpfreaks.com/topic/84129-solved-if-variable-is-null-question/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.