Find number is prime or not in PHP

This program is find number given a number.
EX: In this program how many prime number between 2 to 100.

<?php
$num=100;
   for($i=2;$i<=$num;$i++)
   {
      for($j=2;$j<=$i;$j++)
   {  
      if($i%$j==0)
       {
        break;
       }
   }
       if($i==$j)
       {
     echo "prime number is ".$i."<br>";
    }
  }

?>


Labels: