Answers.Body: <p>It looks like using <code>{{ dump(listItems) }}</code> gave me enough to work with. I forgot to mention I had tried this before. It didn't work the last time, but I suspect I gave it an incompatible data type.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T00:13:20.327Z
Answers.LastActivityDate: 2019-01-30T02:38:14.223Z
Answers.LastEditDate: 2019-01-30T02:38:14.223Z
Answers.UserDisplayName: WTFranklin
Body: <p>I'm trying to find a way of using php's print_r to output the entries that were pulled from the entries in the database. I'm pretty much brand new to Craft cms coming from Laravel, so a common thing I've done in the past with querying the database is seeing what I got back by outputting my array using either print_r or laravel's dd($array) during testing for a sanity check. I can't seem to find an easy way of doing this in Craft. This is what I've tried so far:</p>
  
  <pre><code>{% set listItems = craft.entries().section('todoList').all() %}
  
  {{ listItems }}
  </code></pre>
  
  <p>The {{ listItems }} of course gives the array to string conversion error when rendering the page, so I tried doing:</p>
  
  <pre><code>{{ listItems | join }}
  </code></pre>
  
  <p>but that only outputs the title of the entry. Thank you in advance for any help!</p>
  
Tags: <templating><craft3>
Title: Trying to output contents of array
ThreadText: # Trying to output contents of array
  
  (Asked by: username_0 on 2019-01-29)
  
  I'm trying to find a way of using php's print\_r to output the entries that were pulled from the entries in the database. I'm pretty much brand new to Craft cms coming from Laravel, so a common thing I've done in the past with querying the database is seeing what I got back by outputting my array using either print\_r or laravel's dd($array) during testing for a sanity check. I can't seem to find an easy way of doing this in Craft. This is what I've tried so far:
  
  ```
  {% set listItems = craft.entries().section('todoList').all() %}
  
  {{ listItems }}
  
  ```
  
  The {{ listItems }} of course gives the array to string conversion error when rendering the page, so I tried doing:
  
  ```
  {{ listItems | join }}
  
  ```
  
  but that only outputs the title of the entry. Thank you in advance for any help!
  
  **Tags:** templating, craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-01-30. Score: 1
  
  It looks like using `{{ dump(listItems) }}` gave me enough to work with. I forgot to mention I had tried this before. It didn't work the last time, but I suspect I gave it an incompatible data type.
  
  
  ---
  
  