Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php foreach associative array

$arr = array(
  'key1' => 'val1',
  'key2' => 'val2',
  'key3' => 'val3'
);

foreach ($arr as $key => $val) {
  echo "$key => $val" . PHP_EOL;
}
 
PREVIOUS NEXT
Tagged: #php #foreach #associative #array
ADD COMMENT
Topic
Name
3+1 =