Bellow code is used for the same $date1 = date(‘Y-m-d’); $date2 = ‘2006-08-15’; $days = (strtotime($date1) – strtotime($date2)) / (60 * 60 * 24); echo $days;  

Last updated 7 years, 4 months ago | 2044 views

Tags:- PHP

Python | Program to count the number of words in a string split() and len() method is used to get the number of words in a string. The split() method split a string into a list …

Last updated 5 years ago | 2032 views

Tags:- Python

Python | Fibonacci series This is an example of how to print the Fibonacci series. It takes an input number from the user to print the Fibonacci series. The Fibonacci series is a sequence of …

Last updated 4 years, 8 months ago | 2028 views

Tags:- Python

PHP | What are cookies in PHP? A cookie is a small piece of information store by the browser on the client location and sent to the server with every request. It stores a limited amount …

Last updated 7 years, 4 months ago | 2012 views

Tags:- PHP

Git init | Initialize a local Git repository The git init command creates a new Git repository in local. This is usually the first command you will run before working on a new project. git …

Last updated 4 years, 11 months ago | 2011 views

Tags:- Git

Python | Program to find factorial of a number using recursive function This is an example of how to find the factorial of a number in python using a recursive function. The factorial of a …

Last updated 4 years, 8 months ago | 2004 views

Tags:- Python

DATEDIFF function is use for finding the number of days between two given dates using MySQL DATEDIFF(‘2018-03-07′,’2017-01-01’)  

Last updated 7 years, 4 months ago | 2002 views

Tags:- MySQL

HTML | Basic tags A tag is a string in the language enclosed in angle brackets. An opening tag does not begin with a slash (/). An ending or closing tag is a string that …

Last updated 4 years, 7 months ago | 2002 views

Tags:- HTML

Django | Insert record in database using create() function create() create(**kwargs) Create function create a new object with the given `kwargs`, saving it to the database and returning the created object. It creates an object …

Last updated 4 years, 11 months ago | 1987 views

Tags:- Django

HTML  | What is HTML Elements HTML elements help to create a webpage. It consists of a start tag, some content, and an end tag.   Everything from the start tag to the end tag …

Last updated 4 years, 7 months ago | 1909 views

Tags:- HTML

Python | Bubble sort program Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are not in the right order. This is an example for bubble sort …

Last updated 4 years, 8 months ago | 1863 views

Tags:- Python

Django |  Loosely Coupled Framework Django is called a loosely coupled framework because of its MVT architecture, which is a variant of the MVC architecture. It helps in separating the server code from the client-related code. Django’s …

Last updated 3 years, 7 months ago | 1863 views

Tags:- Django

Accessing CodeIgniter Super Object from External PHP Script (Outside CodeIgniter) Sometimes, you may need to access CodeIgniter's core features — such as models, libraries, or configuration — from a standalone PHP script that’s not within …

Last updated 8 months, 2 weeks ago | 1833 views

Tags:- PHP CodeIgniter

PHP-MySQL | Transaction with commit and rollback try { // First of all, let's begin a transaction $db->beginTransaction(); // A set of queries; if one fails, an exception should be thrown which we are handling at …

Last updated 7 years, 4 months ago | 1816 views

Tags:- PHP PHP-MySQL

JQuery | Difference between JavaScript and JQuery  Javascript is a client-side scripting language whereas jQuery is a library (or framework) built with JavaScript.     Javascript JQuery  javascript is a dynamic and interpreted client-side scripting language …

Last updated 4 years, 6 months ago | 1802 views

Tags:- JQuery JavaScript