Answers for "php foreach list"

PHP
1

php foreach array

$arr = array(1, 2, 3);
foreach ($arr as $key => $value) {
    echo "{$key} => {$value} ";
}
Posted by: Guest on March-06-2021
13

foreach php

foreach (array_expression as $value)
    statement
foreach (array_expression as $key => $value)
    statement
Posted by: Guest on May-26-2020

Browse Popular Code Answers by Language