
March 17th, 2003, 01:31 AM
|
|
5B's
|
|
Join Date: Oct 2002
Location: PC, FL
Posts: 366
Time spent in forums: 2 h 30 m 59 sec
Reputation Power: 7
|
|
|
stepping through an array/object
PHP Code:
function articlePreviousLink($articleId, $pageId)
{
$get_pages = mysql_query("SELECT ap_id FROM article_pages WHERE fk_a_id = '$articleId' AND ap_id = '$pageId'");
$pages = mysql_fetch_object($get_pages);
echo "<a href='{$_SERVER['PHP_SELF']}?s={$_SESSION['s']}&a_id=$articleId&ap_id=" . prev($pages->ap_id) ."'>Previous</a>";
}
Error:
Warning: Variable passed to prev() is not an array or object
I am having problems with the prev() and next() functions. I am using this for an article system and I want to be able to step through each page. any ideas what I am doing wrong here?
TIA
__________________
-- Jason
|