In a MySQL DATE column with the date formatted as 1954-06-15, date('Y-m-d', strtotime($row)) returns 1954-06-01 every time. Am I missing something here?
Are you sure the variable with the value in it is $row? What does var_dump($row); show?
That’s a good question as I use a custom function for outputting anything to review which uses var_dump but for some things it uses print_r.
If I query the database using 1954-06-15 as the value in the query it pulls up the rows but you’re right, var_dump it by itself outputs June 1954. I don’t see anything else that might be modifying it before it gets this far but apparently there is something I missed.
This is one of those Duh moments where the answer was right there! Nothing is changing it. The query that builds the array from which $row comes was formatting it before it even got to the PHP. Fix and now working. Thank you!