Re: Re: HTML_quickform setdefaults question

From: Date: Sun, 10 Dec 2006 20:35:19 +0000
Subject: Re: Re: HTML_quickform setdefaults question
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26065@lists.php.net to get a copy of this message
Thanks Mark, the fetchAll works fine to put all items of the array into $checked. Can you give an example of what you mean by looping through the array to change its representation. So in this case each checkbox is called skill[n]; www.bitesoftware.com - software for a better lifestyle
From: Mark Wiesemann <wiesemann@php.net> To: pear-general@lists.php.net Subject: Re: [PEAR] Re: HTML_quickform setdefaults question Date: Sun, 10 Dec 2006 21:22:13 +0100 MIME-Version: 1.0 Received: from lists.php.net ([216.92.131.4]) by bay0-mc1-f15.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Sun, 10 Dec 2006 12:23:53 -0800 Received: from [216.92.131.4] ([216.92.131.4:18953] helo=lists.php.net)by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTPid FC/ED-00543-8DC6C754 for <rav220@hotmail.com>; Sun, 10 Dec 2006 15:23:53 -0500 Received: (qmail 17347 invoked by uid 1010); 10 Dec 2006 20:22:44 -0000 Received: (qmail 17339 invoked by uid 1010); 10 Dec 2006 20:22:44 -0000 X-Message-Info: LsUYwwHHNt3660MmjhEvYg2f34OAemlK3oXsmRrh6gU= Return-Path: <pear-general-return-26064-rav220=hotmail.com@lists.php.net> X-Host-Fingerprint: 216.92.131.4 lists.php.net Mailing-List: contact pear-general-help@lists.php.net; run by ezmlm Precedence: bulk list-help: <mailto:pear-general-help@lists.php.net> list-unsubscribe: <mailto:pear-general-unsubscribe@lists.php.net> list-post: <mailto:pear-general@lists.php.net> Delivered-To: mailing list pear-general@lists.php.net Delivered-To: ezmlm-scan-pear-general@lists.php.net Delivered-To: ezmlm-pear-general@lists.php.net X-Host-Fingerprint: 212.117.93.247 clx-ac2-247-3.westend.com User-Agent: 40tude_Dialog/2.0.15.1de (b8198354.265.175) References: <1dlegltgt4beg$.11pm9368zflhe.dlg@40tude.net> <BAY108-F24B8701BD276CE9841CBB49AD10@phx.gbl> X-Posted-By: 212.117.93.247 X-OriginalArrivalTime: 10 Dec 2006 20:23:53.0771 (UTC) FILETIME=[1C89B7B0:01C71C99] rav k wrote: Yes I did have var_dump lines as I was trying to figure out if my output was at least correct - I don't think it is... This is the array I get: array(4) { ["userid"]=> int(3) ["profile"]=> string(105) "This is a test profile. The test profile shows information about the user and their business information." ["email"]=> string(18) "rav220@hotmail.com" ["sendmail"]=> int(1) } array(1) { ["skillid"]=> int(2) } You can use fetchAll() instead of fetchRow() to get an array of all results. You might need to loop over this array to transform it into a representation that setDefaults() understands, but that depends on how the "skill" elements are defined (e.g. what names they have). Regards, Mark -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________________ Windows Live™ Messenger has arrived. Click here to download it for free! http://imagine-msn.com/messenger/launch80/?locale=en-gb

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