fork(1) download
  1. $d = array(5, 6.5, 10, 3.355, 400, 9.43);
  2. $c = 100;
  3. foreach($d as &$value)
  4. {
  5. $value = $value + $value * $c / 100;
  6. }
  7.  
  8. echo '<pre>';
  9. print_r($d);
  10. echo '</pre>';
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
	$d = array(5, 6.5, 10, 3.355, 400, 9.43);
$c = 100;
	foreach($d as &$value)
    {
		$value = $value + $value * $c / 100;
	}

echo '<pre>';
print_r($d);
echo '</pre>';