Homedate PHP how to get last 6 months first date byMahabubur Rahman -October 24, 2022 0 You can try following way - for ($i = 1; $i < 7; $i++) { echo date(', Y-m-01', strtotime("-$i month")); } Tags date php Facebook Twitter