Converting date formats in PHP

Views: 50
Reading Time: <1 minute

Staff,
Good night!

One more post that may help some PHP programmers, especially beginners. In many situations we need to convert dates in dd / mm / yyyy format to yyyy-mm-dd and vice versa. For this, I will create a small class with 2 functions for this:

To use this class and achieve the purpose of this post is very simple:

See you next time, guys!