Get time duration between 2 dates in php

We will show you how to get the time difference between to date in PHP.
For this, you need 2 dates From date and To dates. We will create a common function,  you just need to add the from date and to date in it then it will show you the result in an array. You can use this function anywhere in your code.

continue reading.

Show Google sheet data to JSON

This topic is related to show the google sheet data on your website. This is only an Excel spreadsheet. You can use this sheet as a database of your website. So you don’t need any database if you are using the google sheet. As many none technical person is used the Excel sheet for the store and save their business

continue reading.

Object Oriented Concepts (Oops)

[vc_row][vc_column][vc_column_text]Object Oriented Programming Oops is an important part of any programming language. Its play a big role in the programming language like c, c++, java, PHP so on. Object-Oriented Programming Oops is a programming langauge which is based on objects not only procedures and functions Object Oriented Concepts Class : Class is consist of methods and properties. A class is defined by using the class keyword, with the name of the class and a pair of curly braces {}. All its methods and properties goes inside the braces: Below is a class. In this simple class. $model is a property and hornBell() is a method. They are all prefixed with a visibility keyword (public).     <?php Class Car { public $model = “123456”; public function hornBell() { echo “Ding Dang Dong”; } } ?> Objects : Objects are also known as instance. You need to define a class one time and then create maltiple objects that belong to it. Objects of a class is created using the new keyword. To instantiate an object of a class, use the keyword new as below: <?php $car = new Car(); ?> Objects : Objects are also known as instance. You need to define a class one

continue reading.

Infinite Scroll in Nuxt.js

For adding the Load More functionality in the nuxt js you need to install the Vue-infinite-loading here with npm npm install vue-infinite-loading -S Then you need to import this package in your post file like posts.vue file. Make sure you have installed the Axios import axios from ‘axios’ import Infinite

continue reading.

PHP Foreach Loop

Loops through a block of code for each element in an area. Syntax <?php foreach ($array as $value) { code to be executed; } ?> Example The following example will output the values of the given array ($colors): <?php $colors = array(“yellow”, “green”, “blue”, “golden”); foreach ($colors as $value) { echo “$value “; } ?>

continue reading.

PHP For Loop

PHP for loop can be used through a set of codes for the specified number of times. Syntax <?php for(initialization; condition; increment/decrement){ //code to be executed } ?> Example The example below return the numbers from 0 to 5: <?php for ($a = 0; $a

continue reading.

PHP Do While Loop

The block of code executed once and then the condition is evaluated. If the condition is true the statement is repeated as long as the specified condition is true. It executes the code at least one time always because the condition is checked after executing the code. Syntax <?php do { code to be executed; } while (condition is true); ?> Example This example sets the $x variable to 7, then it runs the loop, and then the condition is checked: <?php $x = 7; do { echo “The number is: $x”; $x++; } while ($x <= 5); ?>

continue reading.

PHP While Loop

Loops through a block of code as long as the condition specified equal to true. Syntax <?php while (when condition is true) { code to be executed; } //or while(condition): //code to be executed endwhile; ?> Examples The example below displays the numbers from 1 to 6: <?php $x=1; while($x

continue reading.