Re: [Phplib-users] next_record() to array
Brought to you by:
nhruby,
richardarcher
|
From: Joe S. <jo...@be...> - 2002-03-07 14:47:29
|
On Thu, Mar 07, 2002 at 01:59:21PM +0000, Matt Williams wrote:
> 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.
>
This should work OK, shouldn't it?
$array[] = $db->Record;
Joe
|