Johnson Johnson - 3 months ago 13
PHP Question

PHP: Birthday check today´s date

I have userĀ“s birthday stored in

birthday
as 1999-02-26.

How can I check if the birthday is today?

if(date('m-d') == ..?

Answer
if(date('m-d') == substr($birthday,5,5))

To add what Tim said:

if(date('m-d') == substr($birthday,5,5) or (date('y')%4 <> 0 and substr($birthday,5,5)=='02-29' and date('m-d')=='02-28'))