I am trying to use echo $var;
in my code but sometimes it doesn't exist, so I get a notice from PHP. I don't want to disable all notices from PHP. Is it possible to prevent notice for this statement only?
Note: I tried @echo $var;
but it gives me another error. I also found an alternate echo (isset($var) ? $var: '');
but it is quite long and I don't want to type it everytime.