Portal Home > Knowledgebase > Articles Database > If ($row['test'] >= foo) {echo "bar";}
If ($row['test'] >= foo) {echo "bar";}
Posted by FinalFrontier, 11-27-2011, 05:35 AM |
I am currently using:
So if anything else other than 0, then do foobar. But should something accidentally become minus zero, then its going to show also.
Is there a way to make it so anything over zero will show only?
I tried this, but it didn't work:
|
Posted by n3r0x, 11-27-2011, 12:05 PM |
is more than
>= is more than or equal to
so either >= 1 or > 0 would work
|
Posted by FinalFrontier, 11-27-2011, 08:49 PM |
I tried the >= but it didn't work. It said something about double something.
Thanks for the > 0 code man. Much appreciated!
|
Posted by Matt R, 11-29-2011, 04:43 AM |
If it said something about a double, you likely saw this:
.
That means you did "=>" rather than ">=".
=> is used in statements/assignments rather than operators.
|
Add to Favourites Print this Article
Also Read