Re: A little confusing thing on (mistakenly) geting a offset from string with multi dim index.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx...

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/ 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux