if i understand you correctly you can use the modulus function..
basically, it returns the remainder of division, so if the remainder is 0, it divisible by the number yes?
<?
$num1 = 10;
$num2 = 5;
if($num1%$num2 == 0)
{
$num3 = $num1/$num2;
echo $num1 . " is divisible by $num2, $num2 times $num3 = $num1";
}
else
{
echo $num1 . " is NOT divisible by $num2":
}
?>
hth