RE: [PEAR] QuickForm data transfer
| From: | Mike Carter | Date: | Mon, 05 Apr 2004 16:46:19 +0000 |
| Subject: | RE: [PEAR] QuickForm data transfer | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11628@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Alexey Mirkulove [mailto:master1@megawap.ru]
>
> Greetings!
> In the QuickForm is it possible to send values of fields as
> key values?
>
<snip>
>
> IT WILL DISPLAY:
>
> array(1) {
> ["TimeEx"]=>
> array(2) {
> ["stime"]=>
> string(1) "3"
> ["etime"]=>
> string(2) "10"
> }
>
> BUT I WANT TO SEE INSTEAD:
>
> }
> array(1) {
> ["TimeEx"]=>
> array(2) {
> ["stime"]=>
> string(1) "6:30"
> ["etime"]=>
> string(2) "10:00"
> }
> }
Why not populate your select menus source array in the format you require?
$Times = array(
"6:30" => "6:30",
"10:00" => "10:00"
);
Now when an option is selected the options key is returned which is the same
as the value displayed to the user.
That should work?
Regards,
MC.
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________