View Single Post
Old 04-18-2009, 12:28 PM   #13 (permalink)
Tanax
The Prestige
Upcoming Programmer Inquisitive 
 
Tanax's Avatar
 
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
Tanax is on a distinguished road
Default

Like Kalle said, its' function is to validate if the page in the parameter is a valid page in the array of pages.

So I'm returning true if it exists in the array of pages, and false if it does not.
When I then check:
PHP Code:
if($pagination->checkLink(1337))
{
    echo 
'Amazingly enough, 1337 is a valid page number';

it actually checks:
PHP Code:
if($pagination->checkLink(1337) == true// <- meaning if it returned true
{
    echo 
'Amazingly enough, 1337 is a valid page number';
}
// we can run an else statement if we want to do something if it returned false:
else
{
    echo 
'Unfortunately, 1337 is not a valid page number';

__________________
Tanax is offline  
Reply With Quote