Hi all,
I have some content which I would like to limit to 9 per page in a table. I haven't done the table code yet, and rather concentrate on trying to get the filter working.
When I try to enter the URL of index.php, where page=2 or without a page number I am getting an error in my for loop.
Parse error: syntax error, unexpected T_INC, expecting ')' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\index.php on line 22
<?php
session_start();
if (isset($_GET['page']))
{
$page=$_GET['page'];
}
else
{
$page=1;
}
include('functions.php');
get_videos($conn);
gen_header($page);
?>
<div id="container"><?php nav_bar(); ?>
<?php
$cols=0;
for($i=1*$page;$page*9;i++)
{
echo $i;
}
?>
</div>
<?php gen_footer(); ?>
The line PHP doesn't like is the for loop but I can't think of another way to limit the content. How do I fix this?