How to Get a Date One Month Later in PHP

There are two ways to get a date one month later in PHP By using the date function By using the DateTime::modify Illustration of the example using the date() function to get a date one month later in PHP We will use the date() function to get the date in a specific format. We will … Read more

Display MySQL data in a modal on button click using ajax jquery PHP

In this tutorial, we will learn how to display MySQL data in a bootstrap modal on button click using ajax jQuery PHP. It seems very unprofessional while redirecting to another web page just to view some information. To simplify this problem, we will use a bootstrap modal which looks very user-friendly. After clicking the button, … Read more

PHP difference between two dates in years, months and days

To calculate the PHP difference between two dates in years, months, and days, we have to use three functions strtotime() function floor() function() abs() function Read Here, strtotime, floor and abs functions in PHP Let us consider two dates and store in variables.$date1 = ‘2016-06-01’;$date2 = ‘2020-08-08’; Now, the difference between these two dates will … Read more

strtotime,floor,abs,ceil functions in PHP

strtotime():- This function converts and English text DateTime into a unique timestamp but we have to wrap the result using this date format date(‘Y-m-d’) to avoid the errors. For example The output is 2020-01-01 floor():- This function returns a number down to its nearest integer. For example The output will be like this—- Ceil():- This … Read more