Re: Re: Illegal string offset error in array
| From: | Jasper Bryant-Greene | Date: | Sun, 27 Mar 2005 23:29:28 +0000 |
| Subject: | Re: Re: Illegal string offset error in array | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-211683@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
Yes, but he's talking about PHP5. He probably has E_STRICT on, which is why he's getting that error. I was telling him to use the correct syntax, which will cause him to not get that error. Best regards -- Jasper Bryant-Greene Cabbage Promotions www: www.cabbage.co.nz email: jasper@cabbage.co.nz phone: 021 232 3303 public key: Jasper Bryant-Greene <jasper@cabbage.co.nz> keyID 0E6CDFC5 fingerprint: 2313 5641 F8F6 5606 8844 49C0 1D6B 2924 0E6C DFC5Yes, 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. -RasmusJasper Bryant-Greene wrote:Actually, it is. See the following URL: http://www.php.net/manual/en/language.types.string.php#language.types.string.substrYou 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