I'm new to php. My understanding of php scoping in v5 is that within a file
there are only two scopes, main and in function.
Why doesn't this work?
-------
$err = "original value";
$page = "<html><font color=\"red\"> {$err} </font>Some more HTML</html>";
if(something)
{
$err = "this error";
// $err retains original value instead of becoming "this error"
print $page;
}
else(something else)
{
$err = "that error";
// $err retains original value instead of becoming "that error"
print $page;
}
--------
Thanks much!