/ Published in: PHP

I made this script to count the days until a birthday, the birthdays are stored in mysql with the year intact YYYY-MM-DD, so this function strips the first 4 chars, and adds the current year, if the date has already passed it adds the next year and counts for that.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function countdays($d) { { $diff = $end_ts - $start_ts; return $return; } else { $diff = $end_ts - $start_ts; return $return; } }
Comments
