Re: Selecting checkboxes based on SQL query
| From: | Jim Lucas | Date: | Thu, 23 Feb 2012 20:02:09 +0000 |
| Subject: | Re: Selecting checkboxes based on SQL query | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-316771@lists.php.net to get a copy of this message | ||
On 02/23/2012 11:30 AM, Rick Dwyer wrote:
So, to use my existing function, how do I get the following array to look like the above one: Array ( [0] => Array ( [cb] => 2 ) [1] => Array ( [cb] => 6 ) [2] => Array ( [cb] => 1 ) )$d = <results from SQL query> $a = array(); foreach ($d AS $r) $a[] = $r['cb']; -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/