lalnfl Posted August 1, 2010 Share Posted August 1, 2010 Here are the two if statements: if (!($start <= 0)){ $prev_button = "<a href='forum.php?category_id=$category_id&start=$prev'>Prev</a>"; } if (!($start >= $record_num - $per_page)){ $next_button = "<a href='forum.php?category_id=$category_id&start=$next'>Next</a>"; } But they are not properly working. This is part of a pagination script for the next and previous buttons. Quote Link to comment https://forums.phpfreaks.com/topic/209481-any-reason-why-these-if-statements-arent-working/ Share on other sites More sharing options...
trq Posted August 1, 2010 Share Posted August 1, 2010 We need to see where $start, $record_num & $per_page are defined and you'll need to define 'not working properly'. Quote Link to comment https://forums.phpfreaks.com/topic/209481-any-reason-why-these-if-statements-arent-working/#findComment-1093778 Share on other sites More sharing options...
Mchl Posted August 1, 2010 Share Posted August 1, 2010 Not to mention that !($start <= 0) is same as $start > 0 and !($start >= $record_num - $per_page) is same as $start < $record_num - $per_page Keep it simple. Quote Link to comment https://forums.phpfreaks.com/topic/209481-any-reason-why-these-if-statements-arent-working/#findComment-1093830 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.