Jump to content

Recordset Array


Dubya008

Recommended Posts

I don't know if this is the correct Forum to post  this under but I'm trying to fill the values of a recordset into an array. Here is what I have but it doens't work so far.

 

function fetch($info) {
        return mysql_fetch_array($info);
   }

$Proddb = new mysql;
$Proddb->connect();

$result = $Proddb->query("SELECT * FROM Colors WHERE id = '1'");
$row = $Proddb->fetch($result)
foreach ($row as $value)
{
     echo $value. "<br>";
}
$Proddb-> close();

 

The array is outputting everything twice does anyone know why?

Link to comment
https://forums.phpfreaks.com/topic/211383-recordset-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.