title: manipulate data returned from file
body: <p>I have a file <code>$ocsp_resp_file</code> with the following content:</p>
  
  <pre class="lang-none prettyprint-override"><code>1432599306989.cer.tmp: good
      This Update: May 23 12:54:14 2015 GMT
      Next Update: May 30 12:54:14 2015 GMT
  </code></pre>
  
  <p>I am only interested in the lines starting with "This Update:" and "Next Update:". I would like to retrieve those lines and strip out the spaces and text before the timestamp.</p>
  
  <p>It should end up looking like this:</p>
  
  <pre class="lang-none prettyprint-override"><code>May 23 12:54:14 2015 GMT
  May 30 12:54:14 2015 GMT
  </code></pre>
  
  <p>I am using the following code to return each one but not quite how i want it.</p>
  
  <pre class="lang-none prettyprint-override"><code>$search = 'This Update';
          $lines = file($ocsp_resp_file);
          foreach($lines as $line)
          {
          $line = ltrim($line);
            if(strpos($line, $search) !== false)
            //$line = str_replace('This Update: ', '', $line);
              echo $line;
          }
  </code></pre>
  
  <p>The above code returns this:</p>
  
  <pre class="lang-none prettyprint-override"><code>This Update: May 23 12:54:14 2015 GMT
  </code></pre>
  
  <p>I then tried to remove "This Update: " using the following code (now commented out) but it breaks the logic of the code and each line is returned</p>
  
  <p><code>$line = str_replace('This Update: ', '', $line);</code></p>