The following PHP Practice Questions help you gain expertise in PHP language.
- Write regular expressions including modifier operators and metacharacters.
- Create a program to show the usage of the nested if statement.
- Develop a Program in PHP for type Casting of Variables
- Create a PHP application to show the usage of the switch-case statement.
- Write a program to show the usage of for/while /do-while loop in PHP
- When to use a static variable in a function in PHP? Give an example.
- Create a menu-driven program to perform all four types of sorting – Bubble Sort, Insertion Sort, Selection Sort, and Merge Sort
- Write a program to implement array_pad(), array_slice(), array_splice (), list() functions.(use foreach wherever applicable)
- Create a program to show the application of user-defined functions.
- Write a program that Passes control to another page (include, require, exit, and die functions)
- Create a program to validate the form data using the filter_var() function.
- How to create a simple cookies in PHP that stores a string?
- Create a cookie with data containing multiple fields.
- How to create a cookie that stores user’s name and age.
- Write a program to show the usage of Cookies in PHP.
- Create a program to show the usage of Session
- Write a program to implement oops concepts in PHP.
- Do Form handling In PHP. Design a personal Information form , then Submit & Retrieve the Form Data Using $_GET(), $_POST() and$_REQUEST() Variables.
- Design A Login Form and Validate that Form using PHP Programming
- Create Admin Login and Logout form using session variables
- Write a program to create a file.
- Differentiate between w and w+ modes for creating a file.
- Differentiate between a and a+ modes for creating a file.
- Create a program that uses various PHP library functions, and that manipulates files and directories.
- Write a program to read and display the content of the previously created file.
- Create a program in PHP that counts the number of lines in a text file. Also, display each line with a line number.
- Develop a program to modify the content of an existing file.
- Create a web page that provides File uploading and downloading a file.
- Design a from which uploads And Display Image in PHP
Advanced PHP Practice Questions
- Use phpMyAdmin and perform the following: import, review data and structure, run SQL statements, create users and privileges
- Write a program to create a MySQL database.
- Develop a program to create a table and insert a few records into it using the form.
- Write a program to select all the records and display them in a table.
- Create a program to modify (delete/modify/add) a table.
- Write a PHP script, to check whether the page is called from ‘https’ or ‘http’.
- Develop a program to verify text data as per the pattern.
- Create a dynamic website by incorporating the following functionalities:
- Implement a basic registration and login system, with styling,
- Make the database connection
- Make a connection to a MySQL database, and log in with valid credentials.
- Create Dynamic, interactive, and database-driven web applications using PHP & MySQL
- ·Perform some validation checks. If any of these operations cause an error, stop execution and print the error message. The script s hould respond differently depending on the situation.
Add a “Log Out” button to logout from the system
Further Reading
Examples of Array Functions in PHP
Registration Form Using PDO in PHP
Inserting Information from Multiple CheckBox Selection in a Database Table in PHP
PHP Projects for Undergraduate Students
Architectural Constraints of REST API
Creating a Classified Ads Application in PHP
- Angular
- ASP.NET
- C
- C#
- C++
- CSS
- Dot Net Framework
- HTML
- IoT
- Java
- JavaScript
- Kotlin
- PHP
- Power Bi
- Python
- Scratch 3.0
- TypeScript
- VB.NET
