[PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread jean-baptiste verrey
with mysql use mysql_fetch_assoc, is that what you are asking for ? On 1 June 2011 16:31, Adam Preece a...@blueyonder.co.uk wrote: hi all, is it possible to dynamically build a key value pair array in php from a database result? if so how? kind regards Adam -- PHP General Mailing

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Adam Preece
sorry i should of explained a little more in depth :-). i am using smarty templating engine, and it needs me to pass in an associative array. only an id column and a the name column. i know if i use a more specific query, but if i have the result set already could i build the array so it

Re: [PHP] building a key value pair dynamically

2011-06-01 Thread Tamara Temple
On Jun 1, 2011, at 10:40 AM, Adam Preece wrote: sorry i should of explained a little more in depth :-). i am using smarty templating engine, and it needs me to pass in an associative array. only an id column and a the name column. i know if i use a more specific query, but if i have the