PHP date()… finding Sunday…


This one is simple, but for some reason i was using too many lines of code to get to this same result in just 1 line… U_U :

$fecha = '2011-08-23';
echo date("Y-m-d", strtotime($fecha .' sunday') ); // = 2011-08-21
Advertisements