PHP syntax question: What does the question mark and colon mean? [duplicate]
This is the PHP ternary operator (also known as a conditional operator) – if first operand evaluates true, evaluate as second operand, else evaluate as third operand. Think of it as an “if” statement you can use in expressions. Can be very useful in making concise assignments that depend on some condition, e.g. There’s also … Read more