Menu
Say I have the below
$_GET[‘display’] = ‘user_info’;
$
[code=php]
$_GET[‘display’] = ‘user_info’;
$_GET[‘action’] = ‘new’;
switch (true) {
case ($_GET[‘display’] == ‘user_info’):
echo ‘this’;
break;
case ($_GET[‘display’] == ‘user_info’ && $_GET[‘action’] == ‘new’):
echo ‘that’;
break;
}
At times.. I have just the $_GET[‘display’] variable.. other times I have the $_GET[‘display’] and the $_GET[‘action’] variable.
How can I have both cases run when I have both variables?