×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Todd Mc Brearty
Added: Nov 26, 2012 3:04 PM
Views: 48
Quick if else. This can also be used in javascripts.
There must be an else or an error will be thrown.
In this example $var will equal true if whatsthis is part of the query string.
  1.  
  2. $var = isset($_GET['whatsthis']) ? TRUE : FALSE;