Re: Selecting checkboxes based on SQL query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux