Before I ask you a couple of question about your explanation
I have notice this = something ? something : something
What the = ? : means what's the logic behind.
Now If I use empty here:
$class = ((!empty($cat)) & ($cat == $row['id'])) ? 'class="selected"' : '' ;
then i will have to change the function isset for empty in here as well?
$cat = empty($_GET['subject']) &&
is_numeric($_GET['subject'])?$_GET['subject']:null;
$prod = empty($_GET['menu']) && is_numeric($_GET['menu'])?$_GET['menu']:null;
$menu_type = empty($_GET['menu_type']) && is_string($_GET['menu_type'])?$_GET['menu_type']:null
What if is_numeric means? if the value of the variable is a number or a string?
how do you refer when it is an string?
and finally what would be the output for the example you gave me on $_GET
$var = (!empty($GET['some_var'])) ? $GET['some_var'] : '' ;
if (is_numeric($var)){
//do something with $var
Thank you bro