title: How to format date in PHP from a string of concatenated numbers?
body: <p>I am new to PHP and I am trying to learn more of php date and time but I seem to get stuck with this.</p>
  
  <p>I have this date format:</p>
  
  <pre><code> ddMMyyHHmmss
  </code></pre>
  
  <p>And an example is 120813125055 but I am trying to manipulate the string such that it will give me the format of:</p>
  
  <pre><code> yyyy-MM-dd HH:mm:ss (in the example above, 2013-08-12 12:50:55)
  </code></pre>
  
  <p>I tried to do something like:</p>
  
  <pre><code> date('Y-m-d H:i:s', strtotime('120813125055'));
  </code></pre>
  
  <p>But it always gives me a result of 1969-12-31 18:00:00.</p>
  
  <p>I assume that I need to do some string manipulation in PHP for this but I was wondering if there is an easier and more efficient way to do it?</p>