RE: [PHP-DB] using a variable as values in an array
| From: | Jennifer Goodie | Date: | Mon, 31 Mar 2003 21:32:47 +0000 |
| Subject: | RE: [PHP-DB] using a variable as values in an array | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-26760@lists.php.net to get a copy of this message | ||
Instead of building a string in your loop do the assignment in the loop
I have no idea what is being pulled from where, so I can't really give a
good example
-----Original Message-----
From: Charles Kline [mailto:ckline@rightcode.net]
Sent: Monday, March 31, 2003 1:25 PM
To: php-db@lists.php.net
Subject: [PHP-DB] using a variable as values in an array
I am trying to build an array from the results of a query on a mySQL
table.
I am using a loop to create this string in a variable $mystring:
'30'=>true, '20'=>true
I then need to use it like this:
$defaultValues['ib_article'] = array($mystring);
It isn't working. I am sure there is a better method, can anyone point
me in the right direction?
thanks
charles
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php