PHP Mktime Function

The Mktime() function is an inbuilt function in PHP which is used to return the Unix timestamp for a date. The timestamp returns a long integer containing the number of seconds between the Unix Epoch (January 1, 1970, 00:00:00 GMT) and the time specified. Syntax: parameters This function has seven optional parameters as mentioned below: $hour: It is a parameter which specifies the hour.$minute: It is a parameter which specifies the minute.$second: It is a parameter which specifies the second.$month:

Read more

What is PHP MVC Framework?

MVC Framework? PHP MVC is an application design pattern that separates the application data and logic (model) from the presentation (view). MVC stands for Model, View & Controller. The controller mediates between the models and views. Each of these component has their own role in a role in a project. MVC model was first introduced in 1987 in the Smalltalk programming language. More than 80% of all web app framework rely on the model view controller architecture. Model The model

Read more

Object-Oriented Programming In Php

Object-oriented programming is a technique that solves problems by breaking them down into objects. Object-oriented programming aims to implement real-world entities like inheritance, hiding, polymorphism etc. Object-oriented programming is about creating objects that contain both data and methods, whereas Procedural programming is about writing procedures or methods that operate on data. Classes and objects are the two main aspects of object-oriented programming: Class Object First let’s start with the example of OOp after that we know more about it Example

Read more

PHP XML Tutorial: Create, Parse, Read with Example What is XML?

XML parser An XML parser  is a software library or package of  that provided interfaces for client application to work with an XML document. The XML parser is designed to read the XML and create a way for programs to use XML. XML parser validates the document and check that the document is well formatted. Let’s understand   the working of XML parser by the figure below In PHP there are two major types of XML parsers: Tree-Based Parsers Event-Based Parsers

Read more

PHP Ajax Tutorial with Example

AJAX Ajax is web development technique which help to create highly Responsing, near desktop software like user experience web applications. HTML,CSS for representation JSON/XML/Text for sorting Data, XMLHttpRequest object for action in the background and JavaScript put all this together.Ajax is used in web page to be updated asynchronously by exchanging data with a web sever behind the scene. This makes possible to updated part of a web page without reloading the whole page. Ajax is mechanism for making partial

Read more

How to Create a class in PHP

Interface: An interface is like a class with nothing but abstract methods. All methods of an interface must be public. It is also possible to declare a constructor in an interface. It’s possible for interface to have constants(can not be overridden by a class/interface that inherits them). interface keyword is used to create an interface in php. Interface don’t have instance variables. All methods of an interface is abstract. All methods of an interface are automatically (by default) public. We

Read more

Object Oriented Programming Principles

Encapsulation: PHP means, enclosing the internal details of the object to protect from external sources. It describes, combining the class, data variables and member functions that work on data together within a single unit to form an object. PHP program for encapsulation: The methods or functions in the following program are update password and check the course name. user class defines all the operations related to users. Output: Function to update password ‘abhi2’ for user user1Function to check course name

Read more