title: view php 2nd array in table
body: <p>i have a problem with my 2nd array to display it in the table.. can anyone help me out.. </p>
  
  <pre><code>&lt;?php
      $logdate = "20140918";
      $fileloc = $logdate."TPL.log";
  
      if (file_exists($fileloc)) {
          $result = array();
          $file = explode("\n", file_get_contents($fileloc));
          $rowFile = count($file);
  
  ?&gt;
              &lt;table cellpadding="5" cellspacing="0" width="100%" border="1"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;#&lt;/th&gt;
                          &lt;th&gt;Transaction ID&lt;/th&gt;
                          &lt;th&gt;X&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;
  
  &lt;?php
          $x=1;
          foreach ( $file as $content ) {         
              $result[] = array_filter(array_map("trim", explode(";", $content)));            
  ?&gt;
                      &lt;tr&gt;
                          &lt;td&gt;&lt;?=$x?&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;?=$result[$x][0]?&gt;&lt;/td&gt;
                          &lt;td&gt;&lt;?=$result[$x][9]?&gt;&lt;/td&gt;
                      &lt;/tr&gt;
  
  &lt;?php
                  $x++;
          }
  ?&gt;
                  &lt;/tbody&gt;
              &lt;/table&gt;
  &lt;?php
      } else {
          echo "File x exists";
      }
  ?&gt; 
  </code></pre>
  
  <p>actually i want to insert the record into database.. but i want it to view in the table first. how i want to view the explode result in column..</p>