Solved

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

Posted on 2016-07-25
4
61 Views
Last Modified: 2016-07-25
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
Comment
Question by:brucegust
  • 2
4 Comments
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 450 total points
ID: 41728116
In plain language,...

If $st['StatementRollUp'] contains a falsy value, or $st['templateid'] contains 9, the if statement will evaluate TRUE.
0
 
LVL 109

Assisted Solution

by:Ray Paseur
Ray Paseur earned 450 total points
ID: 41728132
0
 
LVL 142

Assisted Solution

by:Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3] earned 50 total points
ID: 41728155
and the ! means NOT ...
0
 

Author Comment

by:brucegust
ID: 41728160
Rock on!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question