Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 76
  • Last Modified:

What does this mean: if (!$st['StatementRollUp'] || $st['templateid'] == '9') {

I'm looking at this and I'm thinking this is a shorthand way of coding an IF statement. But what does it mean? I was under the impression the "|" character is saying that both of the values have to equal 9, but the exclamation point is baffling me. What's the bottom line?
0
brucegust
Asked:
brucegust
  • 2
3 Solutions
 
Ray PaseurCommented:
In plain language,...

If $st['StatementRollUp'] contains a falsy value, or $st['templateid'] contains 9, the if statement will evaluate TRUE.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
and the ! means NOT ...
0
 
brucegustAuthor Commented:
Rock on!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now