title: Finding Prime Factors PHP
body: <p>I'm trying to loop through the entered number. Output all the number from 1 - number entered and change the color of the prime numbers to red. I can't seem to be able to come up with a good forloop to check for prime numbers.               </p>
  
  <pre><code>             //Variables
              $number = $_POST['input'];
              $start = 1;
  
              while($start &lt;= $number){
                  if($start%10 == 1){
                  print "&lt;tr&gt;".PHP_EOL;
              }
  
              $div_count = 0;
              for ($i=1;$i &lt;= $number; $i++){
                  if(($number%$i)==0){
                      $div_count++;
                  }
              }
                  if($div_count&lt;3){
                      echo $number .",";
                      $start=$start+1;
                  }
  </code></pre>