Answers for "iterate through an associative array php"

PHP
1

loop through values of hash php

foreach ($array as $key => $val) {
    print "$key = $val\n";
}
Posted by: Guest on February-16-2020
11

php iterate through array

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

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

loop through values of hash php

<?php
    while (list($var, $val) = each($array)) {
        print "$var is $val\n";
    }
?>
Posted by: Guest on February-16-2020

Code answers related to "iterate through an associative array php"

Browse Popular Code Answers by Language