Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php loop array

<?php
$arr = array(1, 2, 3, 4);
foreach ($arr as &$value) {
    $value = $value * 2;
}
// $arr is now array(2, 4, 6, 8)
unset($value); // break the reference with the last element
?>
Source by www.php.net #
 
PREVIOUS NEXT
Tagged: #php #loop #array
ADD COMMENT
Topic
Name
7+5 =