leatherback's last suggestion is the best way to go. Store your data in the form that gives you the most flexibility; then you can have your query extract the data in a form already usable, rather than having to manipulate it later.
Otherwise (and sub-optimally) you could have your function alter the date input:
function days_between($date1, $date2)
{
$date1 = str_replace('-', '/', $date1);
$date2 = str_replace('-', '/', $date2);
$date1 = strtotime($date1);
$date2 = strtotime($date2);
return ceil(abs($date1 - $date2) / 86400 + 1);
}
BTW, your function doesn't exactly do what you say; it would better be called "days_between_inclusive()", since, for example, it will return 2 for 2005-06-06 and 2005-06-07.