Jump to content

Pass Parameter Value


lucerias

Recommended Posts

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"; 
        }
}
Link to comment
https://forums.phpfreaks.com/topic/22469-pass-parameter-value/
Share on other sites

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.
Link to comment
https://forums.phpfreaks.com/topic/22469-pass-parameter-value/#findComment-100723
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.