title: i want to display array in view in yii2
body: <p>i want to display array in view form but i don't know how ?
  can any one help me :
  my controller code is :</p>
  
  <pre><code>$query = new Query;
  $query 
      -&gt;select(['Day_Name']) 
      -&gt;from('days')
      -&gt;join( 'INNER JOIN','doctorsworkday','doctorsworkday.Day_id =days.dayid');
  $command = $query-&gt;createCommand(); 
  $dataProvider = $command-&gt;queryAll(); 
  $dataProvider= array($dataProvider);
  return $this-&gt;render('view', 
      [
          'model' =&gt; $this-&gt;findModel($id),
          'days'=&gt;$days,
          'doctorsworkday'=&gt;$doctorsworkday,
          'dataProvider' =&gt; $dataProvider,
      ])
  </code></pre>
  
  <p>my view code is :</p>
  
  <pre><code>&lt;?= 
      DetailView::widget([
          'model' =&gt; $dataProvider,
          'attributes' =&gt; [
              'Day_Name' 
           ],
       ]) 
  ?&gt;
  </code></pre>
  
  <hr>
  
  <p>but its shows : (not set)</p>
  
  <p>when i use vat_dump($dataProvider) there is an array .. but i don't know how to show it </p>
  
  <p><a href="http://i.stack.imgur.com/DuRXI.png" rel="nofollow">enter Var_Dump </a></p>