Get the independent generic version of this tutorial in text tutorial form here: http://www.developphp.com/tutorial_read.php?tid=198
Web Intersect Source Code: http://www.webintersect.com
Adam teaches how to throw down on custom PHP MySQL Pagination programming. Get the independent generic version of this tutorial in text tutorial form here: http://www.developphp.com/tutorial_read.php?tid=198
Web Intersect Source Code: http://www.webintersect.com
Adam teaches how to throw down on custom PHP MySQL Pagination programming. Show Less >>
Having difficulty playing this video? Click here and let us know.
ShiaTV does not endorse any User Submission or any opinion, recommendation, or advice expressed therein, and ShiaTV expressly disclaims any and all liability in connection with User Submissions.
Comments
Add Commentsri
-I am working on the similar one but with XML feed not with MYSQL
if (isset($_GET['page']))
{
$startPage = preg_replace("#[^0-9]#","",$_GET['page']);
}else{
$startPage=1;
}
$perPage =2;
$currentRecord = 2;
$rss = new DOMDocument();
$rss->load('http://www.mnsu.edu/news/papers/library/rss.xml');
$feed = array();
foreach ($rss->getElementsByTagName('item') as $node) {
$item = array (
'title' => $node->getElementsByTagName('title')->item(0)->nodeValue,
'link' => $node->getElementsByTagName('link')->item(0)->nodeValue,
);
array_push($feed, $item);
$currentRecord +=1 ;
if($currentRecord > ($startPage * $perPage) && $currentRecord < ($startPage * $perPage + $perPage)){
echo "
";
}
}
//and the pagination:
for ($x = 1; $x <= ($currentRecord / $perPage); $x++) {
$title = str_replace(' & ', ' & ', $feed[$x]['title']);
$link = $feed[$x]['link'];
echo '
'.$title.'
';
}