title: Yii2: How to show SQL results?
body: <p>I want to show the result of this SQL query execution in a <strong>view</strong>:</p>
  
  <pre><code>$results = Yii::$app-&gt;getDb()-&gt;createCommand('SELECT * FROM colors')-&gt;queryAll();
  $people = print_r($results);
  &lt;?= $people ?&gt;
  </code></pre>
  
  <p>But it always shows: <code>1</code></p>
  
  <p>The results should be a table with <strong>3 columns and 10 rows</strong>. So I don't know why it shows <code>1</code>. I tried with different tables but always shows the same.</p>