In php what is the meaning of $a{'b'} as opposed to $A['b'] ?

Kirino

New member
I understand how {$A['b']} would be used...

but the $a{'b'} seems incorrect... or at least a confusing redundancy.
I mean, of course, $A{'b'} as opposed to $A['b']
 
$A['b'] would be a call to an array slot with the identifyer 'b'

and

$a{'b'} is a special use variable. Remember that php wants whitespace to parse with.
$new_var = "Sports$a{'b'}like";

which would cause php to evaluate the value in the braces before continuing the expression.
 
Back
Top