Q:

PHP and MySQL give two different week number for the same date

I don't understand why PHP and MySQL give two different values of month number for some particular date:
echo date('W', strtotime('2014-04-16'));

this gives 16
while this:
SELECT WEEK('2014-04-16')

gives 15
Could anyone help me?
Thanks

A:

Try using SELECT WEEK('2014-04-16',3) for returning a PHP compatible value. The ,3 indicates that this has weeks starting on Mondays and weeks numbered 1-53.

