A number which is only divisible by 1 and itself is called prime number. Numbers 2, 3, 5, 7, 11, 13, 17, etc. are prime numbers.
Prime number in PHP
Here is the Program to list the first 15 prime numbers.
Prime Number using Form in PHP
We'll show a form, which will check whether a number is prime or not.
On entering number 12, we get the following output. It states that 12 is not a prime number.
On entering number 97, we get the following output. It states that 97 is a prime number.