How can I make them to remain as an array rather then just printing them out? All tutorials just simply introducing the for loop as printing them out
THANKS!
Moderator: General Moderators
Code: Select all
<?
$array = array('1','2','3','4','5');
for($i=0;$i<count($array);$i++) {
$arrayї$i] = $arrayї$i]+5;
}
foreach($array as $num) {
echo $num . "<br>";
}
?>