[PHP] Scoping?

2008-07-28 Thread joshua harr
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 = " {$err} Some more 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!


[PHP] Scoping?

2008-07-28 Thread joshua harr
Never mind. Gotta lay off the dumb juice.