0% found this document useful (0 votes)
145 views

Important_question_unit_wise_PHP

The document contains a comprehensive list of important questions and programming tasks related to PHP, organized by units. Each unit includes questions of varying marks, covering topics such as arrays, loops, functions, form handling, validation, sessions, and cookies. Additionally, it lists programming exercises that require practical application of PHP concepts.

Uploaded by

shraddhavinod1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
145 views

Important_question_unit_wise_PHP

The document contains a comprehensive list of important questions and programming tasks related to PHP, organized by units. Each unit includes questions of varying marks, covering topics such as arrays, loops, functions, form handling, validation, sessions, and cookies. Additionally, it lists programming exercises that require practical application of PHP concepts.

Uploaded by

shraddhavinod1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Important Question (UNIT WISE)

----------------------------------------------------------------------------------------------------------------------------- ---------

Unit 1

2 Marks

1) What is indexed array?


2) What is difference between “echo” and “print”?
3) How to declare variable in PHP?
4) What is PHP?
5) Describe echo statement in PHP.
6) What is the use of print_r ( )?

4 Marks

1) What are differences between PHP constant and variable ?


2) What is variable in PHP? Explain its scope with example.
3) List Advantages of PHP.
4) What are the different types of PHP variables?

Unit 2

2 Marks

1) What is Ternary operator in PHP?


2) List the types of array.
3) What are different arithmatic operators in PHP?

4 Marks

1)Explain for loop and foreach loop with example.

2)What is the difference between for and for each in PHP?

3Assignment operators in PHP.

4) Explain the syntax for each loop with example.

5) What are the different types of arrays in PHP?


6) Write a note on relational operators in PHP.
7) Explain multidimensional array in PHP with example.
8) What is array? Explain different types of array in PHP.
9) What is the difference between a while loop and do while loop in PHP.
10) Explain if ...... then ...... else in PHP.
11) Logical operators in PHP

Unit 3

2 Marks

1) Explain Krsort() function in PHP.


2) Explain var_dump function in PHP.
3) Explain array_slice function in PHP.
4) What is the use of count ( ) in PHP?
5) Explain PHP explode ( ) function.

4 MARKS

1) What are the features of PHP.


2) Explain any two Built-in Array functions in PHP.
3) Write any two Built-in functions of String with example.
4) How to concate two strings in PHP?
5) Explain function with default parameter in PHP using example.
6) What is use of array-slice () in PHP?
7) What are the built in functions of string?
8) Explain passing values by reference with an example.
9) Explain any two string function in php

Unit 4

2 Marks

1) Define sticky form.


2) What is the use of Sticky form in PHP?
3) What is the purpose of break statement?
4) What is the use of isset ( ) function?
5) Which are the methods to submit form?
6) What does the unset ( ) function mean?

4 Marks

1) Explain the concept of sticky form with suitable example.


2) Explain Email id validation in PHP through regular expression.
3) Short note on Radio button and checkbox
4) Explain GET Method.
5) Explain methods to submit form.
6) What is the difference between GET and POST method?

Unit 5

2 Marks

1) What is validation?
2) Which attribute is used for multiple selections in select tag?

4 Marks

1) Form and Form elements. Short note.


2) Validation in PHP

Unit 6
2 Marks

1) Explain setcookie () function in PHP.


2) What is $_SESSION in PHP?
3) What is a session ?
4) What is cookie?
5) Explain $ - SERVER
6) what is the use of session?
7) Explain setcookie ( ) in PHP.
8) What is $-SESSION in PHP?
9)

4 Marks

1) Explain cookies in PHP.


2) What is a session in PHP? Explain it.
3) How to create cookies? Give an example.

Unit 7

2 Marks

1) Explain mysqli_connect() in PHP.


2) List different php MYSQLi functions.
3) Explain difference between static and dynamic website.

4 Marks

1) Short note on Superglobals in PHP

Note-: ( Don’t prepare this question)1

a)Explain self processing form using example.

b) How inheritance is implemented in PHP? Explain using example.


Programs

programs

1. 1.even odd program


2. Write a PHP script to display table of a number?
3. Write a PHP Program to check whether given year is leap year or not.
4. Write a PHP program to calculate factorial of a number.
5. Write a PHP program to calculate area of circle and triangle.
6. Write a code in PHP which accepts two strings from user and displays
7. them after concatenation.
8. Write a PHP script to find the sum of digits of a number.
9. Write a menu driven program in PHP to display arithmetic operations.
10. Write a PHP Program to display reverse of a string.
11. Write a PHP program to print greatest number among given 3 numbers.
12. Write a PHP program to create login page and welcome user on next
page.
13. Write a PHP script to check whether a number is prime or not.
14. Write a PHP program to display multiplication table of entered value.
15. Explain Email id validation in PHP through regular expression.
16. Write PHP program for arsort() function.
17. Write a PHP program to display record of employee with
a. fields(empid,empname,salary,dept).
18. Explain function with default parameter in PHP using example.
19. Write a PHP program to display following operations on string :
a. String concatenation
b. String comparison
20. Write a PHP script to define an interface which has methods area ()
21. volume (). Define constant PI. Create a class cylinder which implements
22. this interface and calculate area and volume
23. Write a PHP program to reverse an array
24. Write a PHP program to use multiple checkbox to select hobbies.
25. Write a PHP program to generate random password.
26. Write a PHP function to calculate factorial of a number using recursion.

You might also like