All pastes #959404 Raw Edit

Someone

public php v1 · immutable
#959404 ·published 2008-03-27 12:53 UTC
rendered paste body
<?php// Lets make an array$array = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25);// Lets set the divisable to 1$checking = 1;// Create a foreach loop for the arrayforeach($array as $numbercheck){// While the checked number is  > than the divisable, if not simply skip which will end the scriptwhile($numbercheck >= $checking){// Divide the number being checked by the divisable$result = $numbercheck / $checking;// If it's an integerif(is_int($result)){// If it is NOT 1if ($numbercheck !== 1){// If it is NOT the same number as the divisable numberif ($numbercheck !== $checking){// Then lets display the number on our screenecho("{$numbercheck}<br>");// Set the divisable number back to 1$checking = 1;}}}else{// If it's not an integer then lets add one to the divisable number$checking =+ 1;}}// Move onto the next number in the array}?>