Way to know if a variable exists

No replies
jose
jose's picture
User offline. Last seen 43 weeks 7 hours ago. Offline
Joined: 03/30/2009

Is very useful to know if a variable exists, this can avoid security and functionality issues.

The way to know if a PHP variable exists is with the function isset():

echo isset ($var);

if variable exists the function returns true Surprized