I am looking to expand on my PHP knowledge, and I came across something I am not sure what it is or how to even search for it. I am looking at php.net isset code, and I see isset($_GET['something']) ? $_GET['something'] : ''
I understand normal isset operations, such as if(isset($_GET['something']){ If something is exists, then it is set and we will do something } but I don’t understand the ?, repeating the get again, the : or the ”. Can someone help break this down for me or at least point me in the right direction?
It’s commonly referred to as ‘shorthand’ or the Ternary Operator.
means
To break it down:
Or…