PHP Database connection
The collection of related data is called a database. XAMPP stands for cross-platform, Apache, MySQL, PHP, and Perl. It is among the simple light-weight local servers for website development....
read more
How to get the first element of an array in PHP?
In this article, we will see how to get access to the first element of an array in PHP, & also understand their implementation through the examples. There are mainly 3 types of arrays in PHP that can be used to fetch the elements from the array:...
read more
JavaScript Date UTC() Method
In JavaScript, the Date.UTC() method is used to create a date object representing a specified date and time in UTC (Coordinated Universal Time). It accepts the year, month, day, hour, minute, second, and millisecond components of the date and returns the number of milliseconds since January 1, 1970, 00:00:00 UTC....
read more
How to get current year in PHP ?
The Date is an inbuilt function used to format the timestamp. The computer stores date and time in UNIX Timestamp. This time is measured as a number of seconds since Jan 1, 1970. Since this is impractical for humans to read, PHP converts timestamp to a format that is readable and more understandable to humans....
read more
Multiple Inheritance in PHP
Multiple Inheritance is the property of the Object Oriented Programming languages in which child class or sub class can inherit the properties of the multiple parent classes or super classes. PHP doesn’t support multiple inheritance but by using Interfaces in PHP or using Traits in PHP instead of classes, we can implement it....
read more
Dynamically generating a QR code using PHP
There are a number of open source libraries available online which can be used to generate a Quick Response(QR) Code. A good open source library for QR code generation in PHP is available in sourceforge. It just needs to be downloaded and copied in the project folder. This includes a module named “phpqrcode” in which there is a file named “qrlib.php”. This file must be included in the code to use a function named ‘png()’, which is inside QRcode class. png() function outputs directly a QR code in the browser when we pass some text as a parameter, but we can also create a file and store it....
read more
Spacing in Bootstrap with Examples
Spacing in Bootstrap refers to the system of predefined margin and padding utility classes that enable developers to add space around elements easily. These classes facilitate layout control and improve visual presentation in web applications.The following Syntax are used in the Various Classes for adding spacing:...
read more
How to select and upload multiple files with HTML and PHP, using HTTP POST?
In this article, we will look at how to upload multiple files with HTML and PHP. Multiple image upload allows the user to select multiple files at once and upload all files to the server....
read more
How to identify server IP address in PHP ?
What is an IP Address ? IP Address or Internet Protocol Address is a numerical value assigned to every device on network which uses the Internet Protocol for Communication. An IP address serves two major functions:...
read more
What is the difference between public, private, and protected in PHP?
Public, private and protected are called access modifiers. Just like C++, PHP also have three access modifiers such as public, private and protected. The visibility of a property, a method or a constant can be defined by prefixing the declaration with these keywords....
read more
How to get random value out of an array in PHP?
There are two functions to get random value out of an array in PHP. The shuffle() and array_rand() function is used to get random value out of an array....
read more
How to get the MAC and IP address of a connected client in PHP?
What is a MAC address? MAC is the abbreviation of “Media Access Control” and it is a 48-bit physical address associated with every networking device. It is printed on the NIC(Network Interface Card) and is globally unique for every networking device. MAC address is used by the data-link layer to route a data packet from source to destination....
read more