Posted by Oli Filth on 09/14/05 20:30
Geoff Berrow said the following on 14/09/2005 18:07:
> I noticed that Message-ID: <5pYVe.5204$hQ4.333@newsfe4-win.ntli.net>
> from Oli Filth contained the following:
>
>
>>Ummm:
>>
>> $word = "single";
>> echo $word[0] . " " . $word[1] . " " . $word[2];
>>
>>Although, this isn't a proper array.
>
>
> Ummmm...ITYM
>
> $word = "single";
> echo $word{0} . " " . $word{1} . " " . $word{2};
>
I believe that curly braces are the recommended practice as of PHP 4,
but square brackets work too.
The point was to show that the OP's original code was essentially
correct as it was.
--
Oli
Navigation:
[Reply to this message]
|