Re: A little confusing thing on (mistakenly) geting a offset from string with multi dim index.
| From: | \\R\\N | Date: | Thu, 15 May 2014 16:26:58 +0000 |
| Subject: | Re: A little confusing thing on (mistakenly) geting a offset from string with multi dim index. | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-323330@lists.php.net to get a copy of this message | ||
Please stop talking about this usage, I found this problem by a mistakely as
I said. My self not made any mistake on this, because I do test.
"Jim Lucas" дÈëÏûÏ¢ news:5374E16B.20607@cmsws.com...
On 05/14/2014 05:55 PM, Rain Lee wrote:
> So, here is the TLDR;
>
> $string = 'this is a string';
>
> In PHP 5.5
> isset($string['check']) === false
> isset($string['check'][0]) === true
>
> Why can't let
> isset($string['check']) === false
> isset($string['check'][0]) === false <--
>
> ?
>
I can see WHAT you are doing and WHAT the results are, but I don't
understand
WHY would you ever do this?
You defined $string with a string of characters. But you are trying to use
$string as an array. This hits me as completely wrong.
I wanted to see an example of you doing this in a complete script. Because
I
cannot envision why you would ever end up doing this. And I wanted to see
how
you got to this as a solution.
--
Jim Lucas
http://www.cmsws.com/
http://www.cmsws.com/examples/