On 7/18/07, Dan Maret <[EMAIL PROTECTED]> wrote:
I just can't figure it out and Google yielded no help. I have a table named
'settings' which contains two fields, 'item' and 'content'. What I would
like to do is grab that data and use the 'item' field as the name, and use
the respective 'content' as the value in an array. For Example:
Array (
copyright => Copyright 2007 yada yada
version = > 2.15.1
)
That way I can do <?= $settings['version'] ?>
Can you help point me in the right direction? Any help would be greatly
appreciated!! :-D
--
-Dan
You need mysql_fetch_assoc() / mysql_fetch_array() functions
http://www.php.net/mysql_fetch_assoc
http://www.php.net/manual/en/function.mysql-fetch-array.php
They come with a good examples in the manual pages.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php