Posted by Rasmus Lerdorf on 03/28/05 02:22
Jasper Bryant-Greene wrote:
> Rasmus Lerdorf wrote:
>
>> Jasper Bryant-Greene wrote:
>>
>>> You can't access string offsets with square brackets [] in PHP5. You
>>> need to use curly braces {} instead.
>>
>>
>> Not sure where you got that idea. This is not true.
>>
>> -Rasmus
>
>
> Actually, it is. See the following URL:
>
> http://www.php.net/manual/en/language.types.string.php#language.types.string.substr
Yes, please read that link again. The syntax is deprecated. That
doesn't mean it doesn't work as you indicated. If we broke this most of
the scripts written for PHP4 would break.
-Rasmus
Navigation:
[Reply to this message]
|