Posted by Kenoli on 09/07/07 15:06
I have faced confusing situations using curly braces around an array,
as well as quotes within square brackets in an array. I wish had hard
examples to offer, but perhaps someone knows the general rule.
I have had expressions involving arrays refuse to work when I put
curly braces around them and then work when I removed them. Other
times the expression doesn't work until I add them.
Similarly with arrays, at times I have had to add and at other times
remove quotes within square brackets in order to get the expression to
work ($array['key']).
I have never been able to derive a consistent rule for either of these
two constructs.
Does anyone know the rules here for when one or the other is required
or not allowed?
--Kenoli
[Back to original message]
|