title: Yii2: display associative array
body: <p>What is the easiest way to display an associative array in a table style?</p>
  
  <p>The array is defined as </p>
  
  <pre><code>$data = [ 'name' =&gt; 'bert', 'age' =&gt; 42 ];
  </code></pre>
  
  <p>Input validation is not required. The output should look like a GridView (one key/value per line), but a GridView requires a model.</p>
  
  <p>So I could use DynamicModel, ArrayDataProvider or other Yii2 stuff. </p>
  
  <p>I tried a lot but there should be an easy way to get this done.</p>