Program for Prime number in PHP

by:

Basic Programs

A number that is merely divisible by 1 and itself is named a major number. Numbers 2, 3, 5, 7, 11, 13, 17, etc. are prime numbers.

2 is that the only even prime.

It is a number greater than 1 then 0 and 1 aren’t prime numbers.

So, there are total 25 prime numbers up to 100. Therefore, the prime numbers 1 to 100 are often listed as, 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.

Program for Prime number in PHP