title: How to get a user log failed details in log file
body: <p>In a log file I want get a how many times user is log failed and the date details I have code for this but its not working correctly.</p>
  
  <p>This is a code</p>
  
  <pre><code>$file = new SplFileObject("failed.log", "r");
  
  while(!$file-&gt;eof()) 
      {   
        $data[] =  current (($file-&gt;fgetcsv("|"))) . next (($file-&gt;fgetcsv("|")));            
      }
  
  $abc = implode(",", $data);
  echo $abc;  
  
  $br = "\n";
  </code></pre>
  
  <p>In this code I am getting like this </p>
  
  <pre><code>John26:Dec:2017:16:15:27,Abc29:Dec:2017:09:39:45,Bhumi29/Dec/2017 14:15:41,Abc 
  </code></pre>
  
  <p>Its not correct, it read first line name and and second line date I don't no what is wrong in my code.</p>
  
  <p>This is my log failed details </p>
  
  <pre><code>John|26:Dec:2017:16:09:45|192.168.0.101|CentaurOne|Failed
  cena|26:Dec:2017:16:15:27|192.168.0.101|CentaurOne|Failed
  Abc|27:Dec:2017:09:25:25|192.168.0.101|CentaurOne|Failed
  Bhumi|29:Dec:2017:09:39:45|192.168.0.101|CentaurOne|Failed
  Bhumi|29:Dec:2017:10:19:28|192.168.0.101|CentaurOne|Failed
  Avccc|29/Dec/2017 14:15:41|192.168.0.101|CentaurOne|Failed
  Abc|04/Jan/2018 15:54:35|192.168.0.101|CentaurOne|Failed
  </code></pre>