PraetorianGuard
New Member
I've written a code for appending the date, month and year variables that are stored in three different variables into an array, and I used the implode function to change that into an appropriate date format; but that is not showing the output as expected.The code is as follows:\[code\]$year = 2012;$month1 = $_POST["month1"];$date = $_POST["date"];$array[] = "{$year}{$month1}{$date}"; $imp = implode('/',$array);echo $imp;\[/code\]here \[code\]$date\[/code\] and \[code\]$month1\[/code\] are taken from the form....the output is displaying as \[code\]20121220\[/code\] but not as \[code\]2012/12/20\[/code\]. What's wrong with the above code?