| View previous topic :: View next topic |
| Author |
Message |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Thu Apr 14, 2011 5:26 pm Post subject: [PHP] if (this but not that) |
|
|
I'm having some kind of mental block (blames PHP) and can't think how to test true for something and false for something else.
maybe like:
if (value1 == true && value2 == false) {run code;}
...or am I going about it the wrong way? _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Thu Apr 14, 2011 5:57 pm Post subject: |
|
|
if(value1 && !value2) {
}
?? _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
leke LXF regular

Joined: Mon Oct 22, 2007 6:45 pm Posts: 479 Location: Oulu, Finland
|
Posted: Thu Apr 14, 2011 7:03 pm Post subject: |
|
|
Thanks Bob, and now that my brain is working again, I realised I should have searched the manual for boolean -- but that didn't occur to me at the time  _________________ I codes here: http://notsure.tk |
|
| Back to top |
|
 |
bobthebob1234 LXF regular

Joined: Thu Jan 03, 2008 9:38 pm Posts: 1356 Location: A hole in a field
|
Posted: Thu Apr 14, 2011 8:39 pm Post subject: |
|
|
Happens to the best of us  _________________ For certain you have to be lost to find the places that can't be found. Elseways, everyone would know where it was |
|
| Back to top |
|
 |
| View previous topic :: View next topic |
|