×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Fabian Constien
Added: Nov 5, 2017 1:45 PM
Modified: Nov 5, 2017 9:56 PM
Views: 5
Tags: no tags
  1. $array = array();
  2. $array[] = array('key1' => 'value1a', 'key2' => 'value2a');
  3. $array[] = array('key1' => 'value1b', 'key2' => 'value2b');
  4. foreach ($array as $element) {
  5.     echo $element['key1'];
  6.     echo $element['key2'];
  7. }