php foreac string code example Example: forreah php $arr = array(1, 2, 3, 4); foreach ($arr as &$value) { $value = $value * 2; }