$c = 100; foreach($d as &$value) { $value = $value + $value * $c / 100; } echo '<pre>'; echo '</pre>';
Standard input is empty
$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>';