List Prime Numbers
The PHP code behind it
Here is the PHP function to check if a number is a prime number. It returns true
if the number is a prime number, otherwise it returns false
.
function isa_is_prime( $num ) { $isPrime = true; for ($i = 2; $i <= $num/2; $i++) { if ($num % $i == 0) { $isPrime = false; break; } } return $isPrime; }
Questions and Comments are Welcome