in date input i have : Y/m/d (output:2013/12/1)
now for insert to MySql databse timestamp i need to change this to this format : m,d,Y (output:12,1,2013)
.
I replace /
with ,
using str_replcae
:
str_replace('/', ",", $_POST['timepub']);
this output is: 2013,12,1
how do change to 12,1,2013
?!
EDIT: I need to this for mktime
costum function not in strtotime
.