Solved

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

Posted on 2016-07-25
4
67 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 143

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

856 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