Friday 15 May 2015

change datetime from mysql to string format on php -


I need help to change my datetime format for string format on my php page

For example if I have this date format: 2013-03-26 20:18:55

I have to display it on my page: March 26,2013 20:18:55.

This is my query that becomes value from mysql

  while ($ row = mysqli_fetch_assoc ($ result)) {echo 'date:' $ line ['postdate ']' & Lt; / Br & gt; Posted by: '. $ Line ['first name'] '& lt; / Br & gt; Posts: '$ line [' post ']. '& Lt; Br / & gt; & Lt; P & gt; ';} Mysqli_close ($ db);   

Note that my date type of my 'postcard' is datetime

Retro Date ('FD, YH: I: S', Stromatium ($ line ['Postcard']));

No comments:

Post a Comment