$remainder=$num % $divideby;
$number=explode('.',($num / $divideby));
$answer=$number[0];
echo $answer.' remainder '.$remainder;




14
down vote
$quotient = intval($dividend / $divisor);
$remainder = $dividend % $divisor;

$quotient = $dividend / $divison;
$integer = (int) ($quotient < 0 ? ceil($quotient) : floor($quotient));
$remainder = $dividend % $divisor;

$a = 2.1;
$b = 8;
$fraction = $a / (float) $b;
$parts = explode('.', $fraction);                
$int = $parts[0];
$remainder = $score - ($int*$b) ; 