Tutorials
Courses
Sign In
Switch to Dark Mode
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
DSA
20.1K+ articles
JavaScript
10.1K+ articles
Misc
7.8K+ articles
JQuery
4.8K+ articles
CSS
4.5K+ articles
HTML
4.5K+ articles
PHP
3.8K+ articles
Node.js
3.2K+ articles
jQuery-jQWidgets
2.5K+ articles
PHP-function
2.3K+ articles
Web Technologies
/
PHP
/
PHP Programs
PHP Programs
291+ posts
Recent Articles
Popular Articles
How to get String Length in PHP ?
Last Updated: 20 May 2021
In this article, we learn how to find the length of the string in PHP.Approach: This task can be done by using the built-in function strlen() in PHP. This method is used t...
read more
Web Technologies
Picked
PHP
PHP Programs
PHP-function
PHP-Questions
How to generate simple random password from a given string using PHP ?
Last Updated: 21 May 2021
In this article, we will see how to generate a random password using the given string. We have given a string and the task is to generate a random password from it.Example...
read more
Web Technologies
Picked
PHP
PHP Programs
PHP-function
PHP-Questions
Google reCAPTCHA Integration in PHP
Last Updated: 26 July 2024
In this article, we are going to discuss how to integrate Google reCAPTCHA v2 in PHP.Approach:Register your site at Google reCAPTCHASubmit HTML formGet response key at ser...
read more
Web Technologies
PHP
PHP Programs
PHP-function
PHP-Questions
Simple Contact Form using HTML CSS and PHP
Last Updated: 05 August 2024
In this article, we will learn to create a basic contact form using HTML, CSS, and PHP.We are creating a simple HTML form that has three fields name, email address, and me...
read more
Web Technologies
PHP
PHP Programs
PHP-Questions
How to mimic multiple constructors in PHP ?
Last Updated: 16 July 2021
Constructors are special member functions for initial settings of newly created object instances from a class.In PHP, a constructor is a method named __construct(), which ...
read more
Web Technologies
Picked
PHP
PHP Programs
PHP-function
PHP-OOP
PHP-Questions
PHP floor() Function
Last Updated: 29 June 2022
We sometimes need to round down the float values to the next lowest integer in our maths problems.PHP provides a built-in function floor() to get this task done through ou...
read more
Web Technologies
PHP
PHP Programs
PHP Program for Find the number of islands | Set 1 (Using DFS)
Last Updated: 06 September 2022
Given a 2D boolean matrix, the task is to find the number of islands. An island is a group of connected 1s.For example, the below matrix contains 6 islandsExample:Input : ...
read more
Web Technologies
PHP
PHP Programs
PHP Program for Count Pairs with Given Sum
Last Updated: 22 July 2024
Given an array of integers, and a number 'sum', find the number of pairs of integers in the array whose sum is equal to 'sum'.Examples:Input : Arr = [ 1, 5, 7, -1 ] ...
read more
Hash
Web Technologies
PHP Programs
DSA
Arrays
Amazon
Accolite
Hike
FactSet
PHP Program For Finding Subarray With Given Sum - Set 1 (Nonnegative Numbers)
Last Updated: 22 July 2024
Given an unsorted array of nonnegative integers, find a continuous subarray that adds to a given number.Examples:Input: arr[] = {1, 4, 20, 3, 10, 5}, sum = 33Output: Sum f...
read more
Web Technologies
PHP Programs
DSA
Arrays
Amazon
Google
Morgan Stanley
Facebook
Zoho
Visa
FactSet
subarray
sliding-window
subarray-sum
PHP Program For Chocolate Distribution Problem
Last Updated: 22 July 2024
Given an array of n integers where each value represents the number of chocolates in a packet. Each packet can have a variable number of chocolates. There are m students, ...
read more
Sorting
Web Technologies
PHP Programs
DSA
Arrays
Flipkart
subset
PHP Program For Rearranging An Array In Maximum Minimum Form - Set 2 (O(1) extra space)
Last Updated: 22 July 2024
Given a sorted array of positive integers, this PHP program rearranges the array alternately: the first element is the maximum value, the second is the minimum value, the ...
read more
Sorting
Web Technologies
PHP Programs
DSA
Arrays
Zoho
Modular Arithmetic
array-rearrange
PHP Program For Counting Inversions In An Array - Set 1 (Using Merge Sort)
Last Updated: 22 July 2024
Inversion Count for an array indicates - how far (or close) the array is from being sorted. If the array is already sorted, then the inversion count is 0, but if the array...
read more
Divide and Conquer
Sorting
Web Technologies
PHP Programs
DSA
Arrays
Microsoft
Amazon
Adobe
Flipkart
Myntra
BankBazaar
inversion
Merge Sort
PHP Program to Sort an Array of 0s, 1s and 2s
Last Updated: 22 July 2024
Given an array A[] consisting 0s, 1s and 2s. The task is to write a function that sorts the given array. The functions should put all 0s first, then all 1s and all 2s in l...
read more
Sorting
Web Technologies
PHP Programs
DSA
Arrays
Microsoft
Amazon
Adobe
Morgan Stanley
Qualcomm
Walmart
Yatra.com
Snapdeal
Paytm
Hike
MAQ Software
SAP Labs
MakeMyTrip
Ola Cabs
PHP Program To Check If A String Is Substring Of Another
Last Updated: 22 July 2024
Given two strings s1 and s2, find if s1 is a substring of s2. If yes, return the index of the first occurrence, else return -1.Examples:Input: s1 = "for", s2 = "geeksforge...
read more
Strings
Pattern Searching
Web Technologies
PHP Programs
DSA
PHP Program To Find Next Greater Element
Last Updated: 22 July 2024
Given an array, print the Next Greater Element (NGE) for every element. The Next greater Element for an element x is the first greater element on the right side of x in th...
read more
Stack
Web Technologies
PHP Programs
DSA
Arrays
Amazon
Samsung
Snapdeal
Payu
Zoho
Informatica
CouponDunia
1
2
3
4
...
20
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !
PHP Programs Archives - GeeksforGeeks