lucerias Posted September 29, 2006 Share Posted September 29, 2006 I have problem of retaining the parameter value shown as the following code. The pre-assigned value for $Parameter1 is written on page and however, when it goes through the outter if statement, the value is lost because when i do the checking on the value of Parameter1 through the inner if, it returned false or null value. The idea here is i want to check whether the array is null and pass the $Parameter1 value based on the check on array accordingly.echo $Parameter1; if(!isset($Array)){ if (!isset($Parameter1)) { echo "true"; } else { echo "false"; }} Quote Link to comment https://forums.phpfreaks.com/topic/22469-pass-parameter-value/ Share on other sites More sharing options...
wildteen88 Posted September 29, 2006 Share Posted September 29, 2006 You are checking whether the Parameter1 variable is not set in the code below:[code=php:0]if (!isset($Parameter1))[/code]If its not set, it'll return true. If it is set it'll return false.If you want it to return true when it is set, and false when its not. Then remove [b]![/b] symbol. Quote Link to comment https://forums.phpfreaks.com/topic/22469-pass-parameter-value/#findComment-100723 Share on other sites More sharing options...
lucerias Posted September 29, 2006 Author Share Posted September 29, 2006 Sorry guys, i take your time because of my carelessness, i overlooked the exclamation mark. Very sorry. Quote Link to comment https://forums.phpfreaks.com/topic/22469-pass-parameter-value/#findComment-100730 Share on other sites More sharing options...
wildteen88 Posted September 29, 2006 Share Posted September 29, 2006 No problem. Its what we're here for. We get these sort of questions all the time. Quote Link to comment https://forums.phpfreaks.com/topic/22469-pass-parameter-value/#findComment-100731 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.