|
Posted by Ira Gladnick on 12/01/06 05:36
I have found that in PHP 5, <?php $SomeArray{0} = $somevalue ?> (note
the squigly braces) appears to be functionally equivalent to the more
usual <?php $SomeArray[0] = $somevalue ?> (square array brackets).
However, doing $SomeArray{} = $somevalue raises an error.
I can't seem to find any documentation that indicates why you can use
squigly braces in the case where an array index is provided. Was
wondering if someone could explain why they work in that situation, and
possibly provide a reference to this use of squigly braces in the PHP 5
documentation.
(I am a rank PHP newbie, for whatever that's worth..)
Navigation:
[Reply to this message]
|