Re: set variable to go outside scope
| From: | Mike Tuller | Date: | Thu, 05 Jan 2006 20:02:05 +0000 |
| Subject: | Re: set variable to go outside scope | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-228236@lists.php.net to get a copy of this message | ||
It's more like this:
if
{
$x=1;
echo $x;
}
elseif
{
echo $x;
}
On Jan 5, 2006, at 1:51 PM, Jay Blanchard wrote:
[snip] The list listing is in an if/elseif statement where if something is set, display the table that has the data, and elseif you click on the delete button, you would delete the data in the row of the table that is is the if statement. One part of the data is in the if scope, and the other is in the elseif scope. I hope that makes sense. [/snip] Nope. Are you asking if the following $row[id]'s are in the same scope? if($foo){ $row[id]; }elseif($bar){ $row[id]; } If so, the answer is yes.