Get Day of the week from Date PHP -


i know there have been several posts before have been unable work in case. keep getting errors.

i have date in format

mm-dd-yyyy

i want day of week this. have tried several methods suggested on other posts such converting before getting day have had no luck. either results if date supplied dd-mm format or 1900 date. function have been using

echo date('l', strtotime($datefield)); 

please can give advice. let me know if need more information.

thanks

$string = "01-24-2016"; $date = datetime::createfromformat("m-d-y", $string);

now date in right format functions.


Comments