Solved

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

Posted on 2016-07-25
4
47 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 108

Accepted Solution

by:
Ray Paseur earned 450 total points
Comment Utility
In plain language,...

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

Assisted Solution

by:Ray Paseur
Ray Paseur earned 450 total points
Comment Utility
0
 
LVL 142

Assisted Solution

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

Author Comment

by:brucegust
Comment Utility
Rock on!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now