I'm getting the following error "PHP Warning: A non-numeric value encountered on line 11". The following code is for a pagination. I have tried everything I know, not sure what else to do. Any help is appreciated.
8 $rowsPerPage = 20;
9 if(isset($_GET['page'])){$pageNum = $_GET['page'];}
10 if(empty($pageNum)) {$pageNum = 1;}
11 $offset = ($pageNum - 1) * $rowsPerPage;
$_GET['page']is probably a string, cast it... or possibly a better approach:$pageNum = (int)!empty($_GET['page']) ? $_GET['page'] : 1;Warningis not anError...$pageNumcould be a string in line 11$_GET['page']must contain something non-numbery.