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