Re: QFC and numeric indexes as element names in groups?
| From: | Ignatius Reilly | Date: | Mon, 01 Mar 2004 15:15:43 +0000 |
| Subject: | Re: QFC and numeric indexes as element names in groups? | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11032@lists.php.net to get a copy of this message | ||
OK. Thanks for the tip.
_________________________
"Mike Carter" <mikeatwork@ukonline.co.uk> wrote in message
news:11054A7BC9A71245BCBB991757932573161901@mail.koa.uk.com...
>
>
> > -----Original Message-----
> > From: Ignatius Reilly [mailto:ignatius.reilly@free.fr]
> > Sent: 01 March 2004 14:31
> > To: pear-general@lists.php.net
> > Subject: [PEAR] QFC and numeric indexes as element names in groups?
> >
> > The indexes on group elements in the container are not 12 and
> > 11 as I would
> > expect, but 12 and 13.
> >
> > Does it mean one should abstain from using numeric values as
> > indexes for
> > group element names? That would be a pity!
>
> This is a PHP array_merge issue and has been covered a number of times on
> the mailinglist. The Solution is to prepend your index ids with an
> underscore to turn them in to strings. Then strip it off after the form
has
> been processed.
>
> The problem is array_merge takes the first index (if integer) and then
just
> adds 1 to it and ignores whatever you specify; hence the 12, 13, 14, 15
> order...
>
> I think there is plans to replace the native array_merge command with
> something self written at one point.
>
> Regards,
>
>
> Mike C.
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit
> http://www.messagelabs.com/email
> ______________________________________________________________________