I have a date in the form DD-MM-YYYY, I know how to explode it into just DD, MM and YYYY on its own but how do I check if this date is valid? For example 01-02-2009 is valid but 31-02-2009 is not.

Any way to check this?

Recommended Answers

All 3 Replies

Member Avatar for diafol

checkdate($m,$d,$y) will check a date. If you've already exploded - easy.

Ahh fixed thanks a lot :)

Member Avatar for diafol

Are we solved then?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.