title: TCPDF ERROR: Some data has already been output, can't send PDF file
body: <p>I keep receiving this error when trying to add my own array into the code.
  Here is my array;</p>
  <pre><code>$array = array();
  
  while (odbc_fetch_row($rs))
  {
      $array[] = odbc_result($rs,'Product Name');
  }
   
  $test = print_r($array);
  </code></pre>
  <p>The original code is here. I'm using an example page to try it because I know the example page works fine.</p>
  <p><a href="http://www.tcpdf.org/examples/example_001.phps" rel="nofollow noreferrer">http://www.tcpdf.org/examples/example_001.phps</a></p>
  <p>This code is before the $html variable and when it is set I just add the $test variable into the $html variable. The odbc connection works fine and the example works fine before I add any code but when I run the script I get this error;</p>
  <pre><code>Array ( [0] =&gt; Test1 [1] =&gt; Test2 ) TCPDF ERROR: Some data has already been output, can't send PDF file
  </code></pre>
  <p>And there is also more than 2 items in the Array. Any ideas?</p>