Just a thought...
As you probably already know the in_array() function will return a boolean value, so it can be used as a expression itself, instead of actually checking if it equals true. Of course, either way works just as good, but it may be a bit simpler to read this way.
PHP Code:
if (in_array($spin_1, $winnums) && in_array($spin_2, $winnums) && in_array($spin_3, $winnums)) { // ... }
And presuming that zero and negative numbers doesn't have a special meaning here, you could also just check if they're less than or equal to 3, like below. Again, either way works just as good, but perhaps this is evan simpler.
PHP Code:
if ($spin_1 <= 3 && $spin_2 <= 3 && $spin_3 <= 3) { // ... }
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
Last edited by lizciz; 03-16-2009 at 05:28 PM..
Reason: Misspelled variable name
|