sabret00the
06-24-2005, 03:18 PM
how would i turn a table into an array going by rows instead of columns?
so $tablenamearray = array('$row1[col1] => $row1[col2], $row2[col1] => [$row2[col2], $row3[col1] => $row3[col2]);
done it $prs_cache_temp = $DB_site->query("SELECT * FROM prs_cache");
while ($prs_cache_tmp = $DB_site->fetch_array($prs_cache_temp))
{
$prs_cache[$prs_cache_tmp['title']] = $prs_cache_tmp['data'];
}
so $tablenamearray = array('$row1[col1] => $row1[col2], $row2[col1] => [$row2[col2], $row3[col1] => $row3[col2]);
done it $prs_cache_temp = $DB_site->query("SELECT * FROM prs_cache");
while ($prs_cache_tmp = $DB_site->fetch_array($prs_cache_temp))
{
$prs_cache[$prs_cache_tmp['title']] = $prs_cache_tmp['data'];
}