Check prime or not number check in the php
<!DOCTYPE html>
<html>
<body>
<?php
function checkPrime($number){
if($number == 1){
return 0;
}
for($i=2;$i<=$number /2 ;$i++){
if($number%$i == 0){
return 0;
}
return 1;
}
}
if(checkPrime(14)){
echo "Prime Number";
}else{
echo "Not Prime Number";
}
?>
</body>
</html>
Thanks you for commenting your questions. I will see question and respond you.