date php yesterday code example Example 1: yesterday php date('F j, Y',strtotime("-1 days")); Example 2: yesterday php date("F j, Y", time() - 86400);