$arrayhoy=getdate(); $hoy=$arrayhoy['year'].'-'.$arrayhoy['mon'].'-'.$arrayhoy['mday']-1; echo strtotime($hoy);