Using the following code to try and get 'Y-m-d', and should return 2016-05-10, but it is instead returning 2016-10-05.
// m-d-Y (Month-Day-Year)
$test_date = '05-10-2016';
// Convert to Y-m-d
$convert_date = date('Y-m-d', strtotime($test_date));
echo $convert_date;
How do I get 'Y-m-d' returned? Not trying to use explode('-', $test_date)
. Is this possible to do using proper time functions?