PHP: handle undefined exception -


i have device sends data url, depending on situations 3 4 parameters received, when try data 4th parameter using

$a = $_get["xyz"]; 

in case when "xyz" not exist function

_get['xyz']; 

returns undefined. tried using try catch , initialized $a empty string in catch part did not work either. how can undefined exception handled?

isset

  if(isset($_get["xyz"])) {         $a = $_get["xyz"];   } 

Comments

Popular posts from this blog

android - How to save instance state of selected radiobutton on menu -

python 3 IndexError: list index out of range -

IF statement in MySQL trigger -