title: PHP Create datetime variable from a string variable
body: <p>I want to create a new datetime variable from a string variable using <code>datetime</code> function.<br>
  So, I have:<br>
  <code>$sqlData=$day . "." . $month . "." . $year;</code><br>
  <code>echo $sqlData;</code></p>
  
  <p><code>$local=new datetime('${sqlData}');</code><br>
  <code>echo $local;</code></p>
  
  <p>The problem appear on <code>echo $local;</code>   </p>
  
  <p>Error msg: <code>Failed to parse time string (${sqlData}), unexpected character'</code></p>