Re: Re: PHP 4.0 Bug #9307 Updated: Numeric-looking array keys are forced to be integers
| From: | David Croft | Date: | Tue, 06 Mar 2001 15:40:03 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #9307 Updated: Numeric-looking array keys are forced to be integers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-48058@lists.php.net to get a copy of this message | ||
function some_generic_function($myarray)
{
foreach ($myarray as $k => $v) {
if (is_string($k)) {
/* some behaviour for associative array element */
}
else {
/* some behaviour for indexed array element */
}
}
}
On Tue, 6 Mar 2001, Stanislav Malyshev wrote:
> DC>> So what about a string key that breaks when someone enters a
> DC>> string that can be autoconverted. Zend turns it into a number
> DC>> and hey presto nothing works any more. Can we have a construct
> DC>> to *force* it not to convert these things?
>
> I don't get what you are talking about. Can you give me an example
> (script)?
> --
> Stanislav Malyshev, Zend Products Engineer
> stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115
>
>
>