Can You Solved this question

Write a php script to get the first and last day of a month from a specified date.

my website Links: https://codewithcpn.com/

<?php $dt = "2021-09-25"; echo 'First day : '. date("Y-m-01", strtotime($dt)).' - Last day : '. date("Y-m-t", strtotime($dt)); ?>