除以两个数字得到结果抛出的结果如何我再次得到除法值


divide two numbers get result throw that result how i get again divided value?

$a=10;$b=3;
$c=$a/$b;
echo $c;
3.33333333
$d=$c+$c+$c=9

但我需要

$d=4+3+3; $d=10;

我怎样才能在$d投掷$c $asum of $b倍?

$value = 10;
$number = 3;
$result = array_fill(0, $number, intval(floor($value / $number))); 
// create new array of values
if ($value % $number) // if you need extra values
    {
    $rest_value = array_fill(0, $value % $number, 1);
    $result = array_map(function($value1, $value2)
        { return $value1 + $value2; }, $result, $rest_value);
    }
var_dump($result);
// array(3) {
//   [0] =>
//   int(4)
//   [1] =>
//   int(3)
//   [2] =>
//   int(3)
// }