PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
$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']];
}
Can anybody help I know this is basic but its causing me great problems.
If you will only need numeric indices in your second dimension consider using mysql_fetch_row() instead of mysql_fetch_array(). *_array() returns an array that contains both the associative and numeric indices so that is actually doubling the size of your result array. If you know you will only need associative indices, use *_assoc(), for numerics use *_row(). For both, of course use *_array().