I was wondering if my array had been done correctly. Here is the code:
$sql = "SELECT * FROM user WHERE user_id = '".$user_id."' ORDER BY user_id DESC";
$numRowsSet = array();
while($numRows = mysql_num_rows($sql)){
$numRowsSet[] = $numRows;
}
foreach($numRowsSet as $num_rows):
$num_pages = $num_rows / $per_page;
$lastpage = ceil($num_pages);
endforeach;
Is my num_rows in php done correctly?