title: Multiple Arrays Output Results in Blank Lines
body: <p>I am trying to output the results of multiple arrays (3) to the same output (console).  Code is roughly like this:</p>
  
  <pre><code>$array1
  foreach ($item in $array1)
  {
    $array2 = get list of services for $item
    $array2 = get list of schedtasks for $item
    if ($array2)
    {
      write-host "array2 data"
      $array2
    }
    if ($array3)
    {
      write-host "array3 data"
      $array3
    }
  }
  </code></pre>
  
  <p>The problem I'm having is that once the first array outputs, the console seem to attach itself to that array's column heading and only displays data for the other arrays if they also have a column heading that matches the first array's column heading.  It still outputs a blank line for each row that doesn't match the heading, indicating that the other arrays are populated.</p>
  
  <p>I verified this by creating and outputting a custom array beforehand with all the same column headings as all the other arrays combined.  Now I get all my data, but in 4 columns that line up with the original custom array.</p>
  
  <p>I'm using Powershell ISE and it does this in both Server 2008 R2 with Powershell 2 and Server 2012 R2 with Powershell 4, which leads me to believe this is expected behavior and I'm not understanding something.</p>
  
  <p>Any ideas what's going on and how I can get the array data output to be handled independently of the previous array's output?  Thanks in advance.</p>