PHP Examples
Must Watch!
MustWatch
PHP Basics
Create a Global Variable in PHP
Difference between the POST and GET Method in PHP
Create a Line Break in PHP
Format and Display the Date in PHP
Generate a Random Number in PHP
Find and Replace Text in PHP
Remove Whitespace from a String in PHP
Capitalize the First Word of a String in PHP
Capitalize Each Word of a String in PHP
PHP print_r() function
PHP foreach loop
Check if a Variable is Empty In PHP
Measure the Length of a String in PHP
Get the Current Page URL of a Web Page Using PHP
Arrays
Merge Arrays in PHP
Fill an Array in PHP
Pad an Array in PHP
Slice an Array in PHP
Create an Associative Array in PHP
Display All of the Elements of an Associate Array in PHP
Sort Numbers of an Array in Ascending Order in PHP
Sort Numbers of an Array in Descending Order in PHP
Sort Strings of an Array in Ascending Order in PHP
Sort Strings of an Array in Descending Order in PHP
Find the Smallest Number in an Array in PHP
Find the Largest Number in an Array in PHP
Make Each Element of an Array Unique in PHP
Create a Multidimensional Array in PHP
Access the Elements of a Multidimensional Array in PHP
Loop Through a Multidimensional Array in PHP
Sort a Multidimensional Array in PHP
Form Data
Form Attributes
Difference Between the POST and GET Method in PHP
Form Data Retrieval
Retrieve Data from a Text Box with PHP
Retrieve Data from a Radio Button with PHP
Retrieve Data from a Check box with PHP
Retrieve Data from an Array of Checkboxes with PHP
Retrieve Data from a Drop-down List with PHP
Retrieve Data from a List Box with PHP
Retrieve Data from a Textarea with PHP
Form Validation
Perform Number Validation in PHP
String Length Validation in a Web Form with PHP
Check if the Submit Button Is Clicked in PHP
Validate an Email Address Using PHP
Validate an Email Address Using PHP & AJAX
Validate a Credit Card Number Using PHP
Validate a Credit Card Number Using PHP & AJAX
How to Do Stuff in PHP
Generate a Random Password Using PHP
Create a Confirmation Page for an HTML Web Form Using PHP
Redirect to Another URL with PHP
Create a Search Engine Using PHP
Create Your Own Search Engine For Your Website Using PHP
Create a Custom Search Engine For Your Website Using PHP
Create an Image Search Engine For Your Website Using PHP
Create a Video Search Engine For Your Website Using PHP
Create an Audio File Search Engine For Your Website Using PHP
Upload Images to a Website Using PHP
Upload Videos to a Website Using PHP
Upload Files to a Website Using PHP
Upload Files to Your Server Using Your Own Website
Restrict the Size of a File Upload with PHP
Create Your Own File Transfer Protocol (FTP) For Your Website Using PHP
Create a Register and Login Page Using PHP
Use Sessions to Track User Data Using PHP
Check if Cookies are Enabled Using PHP
List All Files in a Directory using PHP
List All the Directories of a Website Using PHP
List All Files of the Root Directory and Its Subdirectories of a Website Using PHP
Read the Contents of a File Using PHP
Write Contents to a File Using PHP
Copy a File Using PHP
Rename a File Using PHP
Delete a File Using PHP
Create a New File Using PHP
Create a New Directory Using PHP
Create a Web Crawler using PHP
Retrieve and Get the Contents of a Web Page Using PHP
Connecting to and Using an FTP with PHP
Find Out if a Page Is Secure Using PHP
Redirect to a Secure Connection Using PHP
Create a CSV File Using PHP
Access the Parent Directory of a Directory Using PHP
Get and Send HTTP Headers Using PHP
Prevent Cross Site Scripting with PHP
Serialize an Object or Array in PHP
Unserialize an Object or Array in PHP
Generate a Random Video id Like Youtube in PHP
Object-Oriented PHP
Create a Class in PHP
Create and Access Class Constants in PHP
Instantiate an Object in PHP
Delete an Object in PHP
Initialize an Object in PHP
Invoke a Method On an Object in PHP
Access Overridden Methods in PHP
Create Getter and Setter Methods in PHP
Use the __get and __set Magic Methods in PHP
Use the __toString Magic Method in PHP
Create a Final Class in PHP
Create a Final Method in PHP
Create an Abstract Class in PHP
Create and Implement an Interface in PHP
Clone an Object in PHP
Inspect an Object in PHP
Create a Class Constructor in PHP
Create a Class Destructor in PHP
Constructor Overloading in PHP
Create and Access Static Properties and Methods in PHP
Count the Number of Objects in a Class in PHP
Autoload Classes In PHP
PHP & JSON
Read JSON with PHP
Write JSON with PHP
Parse JSON with PHP
Access the Google Maps API in JSON Format with PHP
PHP & XML
Create an XML Document with PHP
Read XML with PHP
Parse an XML Document Using PHP
Access the Google Maps API in XML Format with PHP
PHP & MySQL
Connect to a MySQL Database Using PHP
Connect to a MySQL Database Using PHP Data Objects (PDO)
Connect to a PostgreSQL Database Using PHP Data Objects (PDO)
Create a MySQL Table Using PHP
Select a Table from a MySQL Database
Check if a MySQL Table Exists Using PHP
Show All Tables of a MySQL Database Using PHP
Delete a MySQL Table Using PHP
Rename a MySQL Table Using PHP
Add a Column to a MySQL Table Using PHP
Add a Primary Key to a Column of a MySQL Table Using PHP
Make a Column of a MySQL Table Unique Using PHP
Rename a Column of a MySQL Table Using PHP
Delete a Column of a MySQL Table Using PHP
Set the Default Value of a Column of a MySQL Table Using PHP
Drop the Default Value of a Column Of a MySQL Table Using PHP
Modify the Defintion or Data Type of a Column of a MySQL Table Using PHP
Insert Data into a MySQL Table Using PHP
Delete a Row of a MySQL Table Using PHP
Delete All Rows of a MySQL Table Using PHP
Insert Data Into a Table of a MySQL Database From an HTML Form Using PHP
Update a Value in a MySQL Table Using PHP
Get the Sum of All Rows of a Column of a MySQL Table Using PHP
Get the Average of All Rows of a Column of a MySQL Table Using PHP
Get the Minimum Value of a Column of a MySQL Table Using PHP
Get the Maximum Value of a Column of a MySQL Table Using PHP
Copy a Table Definition in MySQL Using PHP
Limit the Number of Rows Returned from a MySQL Table Using PHP
Perform Arithmetic Across Columns of a MySQL Table Using PHP
Concatenate Column Values in MySQL Using PHP
Return Random Rows from a MySQL Table Using PHP
Find Null Values In a MySQL Table Using PHP
Show the Structure of a MySQL Table Using PHP
View User Privileges of a MySQL database Using PHP
Display a MySQL Table of a Database using PHP
Display a MySQL Table Without Duplicate Entries Using PHP
Find the Number of Rows in a MySQL Table Using PHP
Sort a Field of a MySQL Table in Ascending Order in PHP
Select Specific Columns from a MySQL Table Using PHP
Display Certain Fields of a Table in MySQL Using PHP
Select a Specific Row of a MySQL Table Using PHP
Insert Images into a MySQL Database Using PHP
Insert Videos into a MySQL Database Using PHP
Insert Files into a MySQL Database Using PHP
Create a Video Manager Using PHP & MySQL
Read a File and Write Its Contents to a Column of a MySQL Table Using PHP
Create a Searchable Database Using MySQL and PHP
Search a MySQL Table For Any Word or Phrase Using PHP
Create a Send Email Form Using MySQL and PHP
Create a Newsletter from Scratch using PHP and MySQL
Create a Website Comment Box Using PHP, MySQL, and AJAX
Load a CSV File Into a MySQL Table Using PHP
PHP Scripts
PHP Script to Convert Any Web Page File Extensions
PHP Games
Number Guessing Game with PHP
Application Programming Interfaces (APIs)
Google Maps
Obtain the Zip Code from an Address from the Google Maps API using PHP
Ebay
Search the Ebay API by Keywords Using PHP
Search the Ebay API by ISBN using PHP
Search the Ebay API by UPC using PHP
RSS Feed
Read an RSS Feed Using PHP
Search an RSS Feed For Any Keyword Using PHP
Comparison
Java and PHP
PHP Configuration Settings
Read an Individual PHP Configuration Settings
Set Individual PHP Configuration Settings
Extend the Run Time of a PHP Script
Change the Maximum Upload File Size of a PHP Script
PHP Common Errors
PHP Header Location Error- Warning: Cannot Modify Header Information- Headers Already Sent