mysql_fetch_array into multi dimensional array
Posted: Thu Feb 05, 2009 3:48 pm
I want to code below to work in such a way that I can access the five rows that have been returned from the database individually.
eg
Can anybody help I know this is basic but its causing me great problems.
Thanks in advance
eg
Code: Select all
$row1 = $data[0][0];
$row2 = $data[0][2];
Code: Select all
$week1 = mysql_query("SELECT * FROM table where checkLive = $checklive and type = '' ORDER BY id DESC LIMIT 15,5;")
or die (mysql_error());
$data = array();
while ($dbRow = mysql_fetch_assoc($week1))
{
$data[$dbRow['id']];
}
Thanks in advance