I have a string date like this:
$date = "23/12/2011";//format: dd/mm/yyyy.
I need each part of this date in its own variable, so that $d=="23", $m=="12", and $y=="2011".
Any suggestions on how to do this would be appreciated...
I have a string date like this:
$date = "23/12/2011";//format: dd/mm/yyyy.
I need each part of this date in its own variable, so that $d=="23", $m=="12", and $y=="2011".
Any suggestions on how to do this would be appreciated...
You could just do:
list($day, $month, $year) = split("[/]", $yourDate);