Hello,
I'm very new to PHP and could use some help...
I have tried a few ways to do this with no luck - it seems as though it should be simple to do. I have existing PHP code and need to modify it based on this:
In my database I have 3 columns - I need to call a different function based on if a value exists in COLUMN1, COLUMN2, or COLUMN3 - something to the effect of if a value exists in COLUMN1 then do this... if a value exists in COLUMN2, then do this... etc.
Your help is much appreciated.
Thank You
If question - seems simple enough but I'm new to PHP...
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
General concept:
Code: Select all
if (!empty($foo1))
{
doSomething();
}
if (!empty($foo2))
{
doSomethingElse();
}