davidf85 Posted September 12, 2011 Share Posted September 12, 2011 $page = (isset($_GET["page"]))?$_GET["page"] : 1 ; This is from a pagination script, and I am wondering what the ? means here, and what the : does. Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted September 12, 2011 Share Posted September 12, 2011 Ternary operator, simplified IF / ELSE: http://php.net/manual/en/language.operators.comparison.php 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.