View Single Post
Old 09-11-2006, 10:31 AM   #4 (permalink)
moriakaice
Junior Member
 
Join Date: Aug 2006
Posts: 29
Default Re: Number Factoring PHP Script HELP!!!

Yup, we can add:
PHP Code:
if ($counter 2
{
    
$counter 2;
}

$counter floor($counter); 
after ++counter;

Of course, you can put the floor into some checking, so it won't be executed each time; it's up to you. Same with $counter checking - if you'll be factorising numbers by yourself, you won't provide it with incorrect arguments, however, when making it public, Itsacon is right, be careful about varibles.
moriakaice is offline   Reply With Quote
Sponsored Links