title: How to fix Uncaught Error: Call to a member function add() on string
body: <p>Am trying to print the date to pdf using fpdf library, but there is an error.</p>
  
  <pre class="lang-php prettyprint-override"><code>$date = date("F j, Y");
  $date-&gt;add(new DateInterval('P14D'));
  $this-&gt;Cell(185, 5, 'Due Date: '.date_format($date, 'Y-m-d'), 0, 0, 'R');
  </code></pre>
  
  <p>I need to add 14 days to the current date and print</p>