Zeev Suraski wrote:
> At 18:21 11/5/2001, Brian Foddy wrote:
> > >
> > > On 11 May 2001, Stig Sæther Bakken wrote:
> > >
> > > > Why not have both numerical and descriptive indices?  Backwards
> > > > compatible, slightly bloatish, but not really a problem.
> > >
> > > it's already implemented this way now (it was added last night) AFAIK
> > >
> > > Derick Rethans
> > >
> >
> >You are creating the same array indexed both by a
> >integer and a string?  I'm curious how this is done.  I might
> >have a good use for this trick.
> No special tricks needed;  PHP's arrays support both numeric and string
> indices ever since PHP 3.0 (at least).  You can simply add both types of
> indices to the same array without having to do anything special.

Thanks everyone, I knew arrays could be one or the other, but
never considered the same value with multiple indexes.  I have
a perfect use for this, where an array I build, the values
have a int index value, and a string an equiv string name.
I'm already doing the zend_hash_update and index_update functions
so this should be pretty easy.

Question, what will zend_hash_get_current_key return if it gets
input like this?


PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to