[Phplib-users] next_record() to array
Brought to you by:
nhruby,
richardarcher
|
From: Matt W. <li...@ye...> - 2002-03-07 14:01:37
|
Hi all
I'm writing a search class that I can get to search which ever table I tell
it to.
at the moment I am I am using this code
while($db->next_record())
{
$array[] = array("name"=>$db->f("name"),"location"=$db->f("location"));
}
the problem is how can I do the same thing without knowing in advance the
column names returned from the database.
so the index is the column name and the value is the column entry for that
particular row.
while($row = mysql_fetch_row()) {
$myArray[$row[0]] = $row[1];
}
There's a an entry in the contributed notes for the php manual that says the
above will do this.
How could I do it with PHPLib.
TIA
matt
|