> I'm trying to build an associative array from a database result. How can I
> assign a new key and value pair
>
> eg
>
> mysql_fetch_row etc....
> {
> dbRowCol1 = myarray(key)
> dbRowCol2 = myarray(value)
> }
>
> You get the general idea. Can't find any examples. I'm trying to lookup a
> key and retrieve the corresponding value.
is this what you are lookin for?
mysql_fetch_row etc....
{ //let's assume $row is result of mysql_fetch:row(..
$key = $row['key_sql_col'];
$value = $row['value_sql_col'];
$myarray[$key]=$value;
}
rush
--
http://www.templatetamer.com/
"Chris Neale" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php