Answer by David Kuridža for and or operator php question?
As others pointed out, make sure to check what is returned for is_singular() and what is the value of $iphone. It could be the values are not what you expect them to be.On a side note, what about...
View ArticleAnswer by Laph for and or operator php question?
The Syntax is correct. You should check the return Value of "is_singular" and the Value in $iphone, since both of these seem to "evaluate" (!) to (boolean) false. Since PHP is a loosely typed language...
View ArticleAnswer by Crozin for and or operator php question?
Just replace both operands: ($iphone || is_sungular()) ? 0 : 1.OR operator doesn't execute second operand if the first one is true. It means, if $iphone is true then is_singular() won't be even executed.
View ArticleAnswer by Marc B for and or operator php question?
Try putting the entire ternary statement in brackets. PHP's operator precedence rules will cause the echo to echo out the results of the if() portion of the statement, rather than the results of the...
View Articleand or operator php question?
hey guys,i'm confused with this:forceAnim: <?php echo (is_singular() || $iphone) ? 0 : 1; ?>i have this forceAnim parameter in one function that could be either 0 or 1.is_singular means that a...
View Article
More Pages to Explore .....