This works similar to javascripts short-curcuit assignments and setting defaults. (e.g. var a = getParm() || 'a default';)
<?php
($a = $_GET['var']) || ($a = 'a default');
?>
$a gets assigned $_GET['var'] if there's anything in it or it will fallback to 'a default'
Parentheses are required, otherwise you'll end up with $a being a boolean.