php foreach value in a string code example
Example 1: loop through values of hash php
foreach ($array as $key => $val) {
print "$key = $val\n";
}
Example 2: php ofreach
<?php
$a = array(1, 2, 3, 17);
foreach ($a as $index => $v) {
echo "Current value of \$a: $v.\n";
}
?>