This is probably an easy question, but I can only find ways to do it the opposite way, I want to change 2004-06-25 to 20040625.
Thanks in advance.
Couple ways. There's more ways than this too.
$date = "2004-06-25"; $new = date("Ymd", strtotime($date)); // or $new = str_replace("-", "", $date);