RE: [PEAR] QFC and numeric indexes as element names in groups?

From: Date: Mon, 01 Mar 2004 15:03:28 +0000
Subject: RE: [PEAR] QFC and numeric indexes as element names in groups?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-11031@lists.php.net to get a copy of this message
> -----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 ______________________________________________________________________

« previous php.pear.general (#11031) next »