If you didn't write that and the you expect to hand it in as 'homework', you should be ashamed of yourself.
Alex already gave you the closest to an answer, have you actually read his response?
In layman terms:
- Get current UNIX timestamp with
http://www.php.net/time - Get your birthday timestamp with
http://www.php.net/mktime - Do a subtraction of current - yourbirthday, this is the difference in seconds
- Divide by 86400 (60 * 60 * 24 -- seconds in a day) and floor this value
http://www.php.net/floorThat's the difference in days.
http://en.wikipedia.org/wiki/Unix_timeIf you did, I apologise.
If you did, then I think you should adopt arithmetic over string matching.