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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.