One of the my client come to me and say that visual composer element 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 browser console. After the […]
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.