PHP, Generating Primes, Whats Wrong
<p>Whats wrong with this? The conditional statement looks solid enough, yet all numbers are included</p>

<pre><code>function generate_primes(){
   $max = 100;
   $primes = array();

   for($current_pointer = 1; $current_pointer &lt;= $max; $current_pointer++){

        for($divider = 1; $divider &lt;= $current_pointer; $divider++){
        //if(in_array($divider, $primes)){
        if(($current_pointer % $divider === 0) &amp;&amp; ($divider !== 1) &amp;&amp; ($divider ===    $current_pointer)){
           $primes[] = $current_pointer;
           }
//}

        }

    }
print_r($primes);

}
generate_primes();
</code></pre>
