PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The first expression before ? is the if statement. If that statement is true then you do whatever after the ? but if falsethen you do the thing after the :
Chaining ternaries is the work of the devil. Placing two in the same statement is almost as bad. If-then-else constructs are far easier to read. I generally only use ternaries for variable initialization.
Looks funny with such a short expression, but with more realistic long variable names using multiple lines like that helps to make clear that there's a condition there.