php validate date function using explode
<p>I was trying to define a function to validate date entered in dd/mm/yyyy format.
I am trying to use the inbuilt function checkdate() and explode() to supply values to checkdate()
This is the code:</p>

<pre><code>    &lt;?php
function validate_date($date){
$array = explode('/',$date,3);
checkdate($array[1],$array[0],$array[2]);
}
?&gt;
</code></pre>

<p>I get an error:</p>

<p>Warning: checkdate() expects exactly 3 parameters, 1 given in C:\xampp\htdocs\officespace\mdm\Create_Individual.php on line 57</p>

<p>Please can someone indicate where exactly I'm going wrong.</p>

<p>Thanks.</p>
