Write a php program to accept a number from the user and print whether it is prime or not
<?php
$x = 0;
$number = 2;
while ($x < 10 )
{
$div_x=0;
for ( $i=1; $i<=$number; $i++)
{
if (($number%$i)==0)
{
$div_x++;
}
}
if ($div_x<3)
{
echo $number." , ";
$x=$x+1;
}
$number=$number+1;
}
?>