Strange key behaviour

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

 



Hey there!

i have a routine like this:

$myarray['1'] = 'aösldfjkasöldkjf';

foreach($myarray as $key => $value) {
   echo $key{0};  // outputs nothing
   echo substr($key,0); // outputs 1 like intended
}

Any ideas why this is like that? I am using

php 4.3.11-dev

- Johannes

--
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