keepingbusy
Programmer
Hi
Part of my code has a line containing a variable which is a date:
Code:
echo "<td ><strong>Date posted:</strong></td><td>".$listing['[b]PostDate[/b]']."</td>";
I have found this:
Code:
$dt = date_create_from_format 'd/m/Y', "02/03/2008" );
echo $dt->format( 'd/m/Y' ), "\n";
This is ok if you use the date "02/03/2008"
What I want to use is the variable PostDate instead of "02/03/2008"
I have tried different combinations to make the variable date PostDate show but I keep getting errors.
Please can anyone assist?
Thank you