To find the nth prime number in PHP, you can use a function that generates prime numbers until you have found the nth one.
Here's a function that does just that:
main.php531 chars20 lines
Example usage:
main.php35 chars2 lines
This will output 29, which is the 10th prime number.
gistlibby LogSnag