shoutdots Posted June 22, 2007 Share Posted June 22, 2007 hello people, please i need someone to explain to me what the point from " Determining If a Variable Exists " and using isset() ( with simple example ). thank you for helping Quote Link to comment Share on other sites More sharing options...
php_joe Posted June 22, 2007 Share Posted June 22, 2007 Like this: <?php if (isset($var)) { echo "This var is set so I will print."; } ?> run the document like this: test.php?var=1 and test.php?var= and you can see the difference. Quote Link to comment Share on other sites More sharing options...
shoutdots Posted June 22, 2007 Author Share Posted June 22, 2007 Tell if this right you give an example that when i put a value ( any value ) to the $var, thats mean isset() will see that there is a vaule and display echo msg ? Quote Link to comment Share on other sites More sharing options...
php_joe Posted June 22, 2007 Share Posted June 22, 2007 Tell if this right you give an example that when i put a value ( any value ) to the $var, thats mean isset() will see that there is a vaule and display echo msg ? Yes Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 22, 2007 Share Posted June 22, 2007 ISSET() (should be caps) is a function that returns a boolean yes/no if the given parameter is not false or undefined. so you can say if(!ISSET()) and if the var is not set it will execute the if block. Generally its only used in if/else if cases. Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted June 22, 2007 Share Posted June 22, 2007 ISSET() (should be caps) ... Where in the manual does it say that? isset is not case sensitive In fact all functions within PHP are case insensitive. Quote Link to comment Share on other sites More sharing options...
shoutdots Posted June 23, 2007 Author Share Posted June 23, 2007 thank you very much for helping got it now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.