How to convert DateTime to String using PHP ?
The task is to convert DateTime to String using PHP. There are two ways to convert it.
1. By using Format method
- In the Format method, we can convert the DateTime object to a string.
- The DateTime to string program is programmed below:
2. By using list() method:
- The list() method is used to convert the DateTime object to string.
- The shorter way of list method is programmed below:
My Personal Notes arrow_drop_up