Scope is the boundary of where you can access a variable (or property or method). Your code isn't an example of scope, it's syntax parsing. Within double quotes, php will recognize and try to evaluate variables. Because $b[..] is how you refer to an array element, php will try to parse it as such.
Curly braces are used for multiple things. In the context of your code, they delimit the beginning and end if your if(...) condition, as in
if (condition)
{
// do all
// of this stuff
// between the { and }
// if the condition
// is true
}
This has nothing to do with scope, unless you wanna look at it in the sense of "this is where the code to be executed if the condition is true starts and ends" but as mentioned, that's not what "scope" really means.
You can also use {..} to tell php where to start and end the variable name, to avoid ambiguity. For example:
In this example, php will try to parse the variable as $abar because that is a valid variable name:
$a = "foo";
$b = "$abar"
echo $b; // output : nothing - $abar doesn't exist (will give you a notice)
Since you want it to parse $a not $abar, you would use {..} to specify the beginning and end of the variable name:
$a = "foo";
$b = "${a}bar"
echo $b; // output : foobar