title: Can you clean up Print_R output
body: <p>I am getting this from a <code>print_r</code> output:</p>
  
  <pre><code>Array ( ) Array ( ) Array ( ) Array ( ) Array ( [0] =&gt; http://www.ls.bouwmanbv.nl [1] =&gt; http://www.ls.bouwmanbv2.nl [2] =&gt; http://www.ls.bouwmanbv3.nl [3] =&gt; http://www.ls.bouwmanbv4.nl ) 
  </code></pre>
  
  <p>How can I make it skip empty <code>Array ()</code> and remove the <code>[#] =&gt;</code> so that I get a list like this:</p>
  
  <pre><code>http://www.ls.bouwmanbv.nl
  http://www.ls.bouwmanbv2.nl
  http://www.ls.bouwmanbv3.nl
  http://www.ls.bouwmanbv4.nl
  </code></pre>
  
  <p>This is the code in question:</p>
  
  <pre><code>&lt;?php
  $user_  = JFactory::getUser();
  $db     = JFactory::getDBO();
  $levels = JAccess::getAuthorisedViewLevels($user-&gt;id);
  
  foreach($levels as $key =&gt; $level)
  {
    $query = $db-&gt;getQuery(true);
    $query  = 'SELECT title FROM #__pf_projects';
    $query .= ' WHERE access = ' . $level;
    $db-&gt;setQuery($query);
    $results = $db-&gt;loadColumn();
    print_r($results);
  }
  </code></pre>
  
  <p>Thanks everyone for helping.</p>