lban1 Posted February 13, 2011 Share Posted February 13, 2011 Hello everyone, Can somebody help me? I am a novice in PHP programming. I do not understand a line of code below: $action = isset($_GET['action']) ? $_GET['action'] : ''; The variables $action saves the values obtained by the GET method, but what does this piece of code ? $_GET['action'] : ''; Thanks in advance! Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 13, 2011 Share Posted February 13, 2011 It's called a ternary operator. it's in the place of "if else". Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted February 13, 2011 Share Posted February 13, 2011 That is the ternary operator. See example #2 HERE. Quote Link to comment Share on other sites More sharing options...
lban1 Posted February 13, 2011 Author Share Posted February 13, 2011 Thank you for responding so quickly, you have helped me a lot Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.