What would be the regex term to check if a number matches? Like for example: <a href="page.php?search=<? echo $search ?>&page=<? echo $previous ?>"> Previous</a> | <a href="page.php?search=<? echo $search ?>&page=<? echo $next ?>">Next</a> Code (markup): $previous and $next are always page numbers. How would i determine if $previous matches $next, I should do an str replace so it dont echo. (because their is no next page).
Why would you need a regex for that? <a href="page.php?search=<?php echo $search ?>&page=<?php echo $previous ?>"> Previous</a> <?php if ($previous != $next): ?> | <a href="page.php?search=<?php echo $search ?>&page=<?php echo $next ?>">Next</a> <?php endif; ?> Code (markup):