David Barbata David Barbata - 1 year ago 125
PHP Question

Php convert a date to string character

I have searched but I could not find out how to convert a date from a character string. For example string date is 18-08-2016 I want to convert 18 August 2016 How can I do?

Answer Source
$input = '18-08-2016';
echo strftime('%d %B %Y',strtotime($input));// 18 August 2016

Use this resource to format the output to your liking.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download