Skip to content

Category Archives: PHP Programs

Given a string array with white spaces, the task is to remove all white spaces from every object of an array.Examples:   Input: arr = ["Geeks… Read More
The parameters from a URL string can be retrieved in PHP using parse_url() and parse_str() functions. Note: Page URL and the parameters are separated by… Read More
Given a string which contains printable and not-printable characters. The task is to remove all non-printable characters from the string. Space ( ) is first… Read More
The re-index of an array can be done by using some inbuilt function together. These functions are: array_combine() Function: The array_combine() function is an inbuilt… Read More
PHP doesn’t support to return multiple values in a function. Inside a function when the first return statement is executed, it will direct control back… Read More
The first word of a sentence can be obtained with the help of various inbuilt functions like strtok(), strstr(), explode() and some other methods like… Read More
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… Read More
Associative Array: Associative arrays are used to store key-value pairs. For example, to store the marks of the different subject of a student in an… Read More
Prerequisite – Static Function PHP In PHP, we can have both static as well as non-static (instantiated) classes. Static class Introduction: A static class in… Read More
Adding days to $Date can be done in many ways. It is very easy to do by using built-in functions like strtotime(), date_add() in PHP.Method… Read More
Global variables refer to any variable that is defined outside of the function. Global variables can be accessed from any part of the script i.e.… Read More
In PHP we can associate name/label with each array elements using => symbol. This is very helpful as it is easy to remember the element… Read More
The month number can be converted into a month name by using PHP functions. There are two functions to convert the given month number into… Read More
An object copy is created by using the clone keyword (which calls the object’s __clone() method if possible). An object’s __clone() method cannot be called… Read More
!== Operator: It is called as non-identical operator. It returns true if operands are not equal, or they are not of the same type. Syntax:… Read More

Start Your Coding Journey Now!