One of my clients come to me and say that visual composer element does not load in page editor after the update to WordPress 4.8. When I checked it will show like below image. The error I get “$template.get is not a function” in the browser console. After some time of googling, I got this […]
Category / PHP
In one the my project we need to calculate user age from data of the birth. It is very easy to calculation age fro data of birth. For more details check out the following snippet:
# object oriented
$from = new DateTime('1992-01-04');
$to = new DateTime('today');
echo date_diff(date_create('1992-01-04'), date_create('today'))->y;
Reference link stackoverflow and download code from here Thanks for reading and let me know need any changes.