Answers for "is it possible to use foreach in php array?"

PHP
24

php foreach

$arr = ['Item 1', 'Item 2', 'Item 3'];

foreach ($arr as $item) {
  var_dump($item);
}
Posted by: Guest on June-01-2020
0

php foreach

foreach ($arr as &$value) {
    echo($value);
}
Posted by: Guest on November-02-2021

Code answers related to "is it possible to use foreach in php array?"

Browse Popular Code Answers by Language