過去20年以内の任意の日付である可能性がある、ユーザー入力日付を取る関数をphpで構築しようとしています。PHP で getdate() 関数を使用して、曜日を返そうとしました。これが私が持っているもので、機能していません。
$date="8/4/2010";//user input
$dateget=getdate($date);
echo $dateget; // i want an output like "monday" or "saturday"
このコードを実行すると、このエラーが発生します
A non well formed numeric value encountered (on the $dateget=getdate($date) line)
ありがとう