Phill Pafford
07-31-2008, 02:57 PM
Hi All.
Need some help
$q = "SELECT * FROM " . DEFINED_TBL;
$result = mysql_query($q, $this->connection);
while($row = mysql_fetch_row($result))
{
$rs[] = $row;
}
return $rs;
results
foreach($result as $k1 => $d1)
{
echo "Key1: " . $k1 . " DATA1: " . $d1 . "<br />";
// This shows array as one of the values
foreach($d1 as $k => $d)
{
echo "Key: " . $k . " DATA: " . $d . "<br />";
// this has the values I want
}
}
returns look like this
Key1: 0 DATA1: Array
Key: 0 DATA: 1
Key: 1 DATA: WANTED RESULTS
Key: 2 DATA: 0
would like it to be returned in one array
Need some help
$q = "SELECT * FROM " . DEFINED_TBL;
$result = mysql_query($q, $this->connection);
while($row = mysql_fetch_row($result))
{
$rs[] = $row;
}
return $rs;
results
foreach($result as $k1 => $d1)
{
echo "Key1: " . $k1 . " DATA1: " . $d1 . "<br />";
// This shows array as one of the values
foreach($d1 as $k => $d)
{
echo "Key: " . $k . " DATA: " . $d . "<br />";
// this has the values I want
}
}
returns look like this
Key1: 0 DATA1: Array
Key: 0 DATA: 1
Key: 1 DATA: WANTED RESULTS
Key: 2 DATA: 0
would like it to be returned in one array