We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2
CA-304 PHP QUESTION BANK
Q1) Attempt the following (2 marks):
1) Explain difference between static and dynamic website. 2) How to declare variable in PHP? 3) What is the use of count ( ) in PHP? 4) What is a session? 5) What is cookie? 6) Explain PHP explode ( ) function. 7) How to concate two strings in PHP? 8) What is PHP? 9) Explain $ - SERVER 10) Describe echo statement in PHP. 11) List the types of arrays. 12) What are different arithmetic operators in PHP? 13) What is abstract class in PHP? 14) Define sticky form. 15) What is validation? 16) What is use of array-slice () in PHP? 17) What are the databases supported by PHP? 18) what is the use of session? 19) Which attribute is used for multiple selections in select tag? 20) What is the purpose of break statement? 21) What is difference between “echo” and “print”? 22) What is the use of isset ( ) function? 23) Which are the methods to submit form? 24) Explain setcookie ( ) in PHP. 25) What is $-SESSION in PHP? 26) Explain split ( ) function in PHP. 27) What does PEAR stands for? 28) What is the use of print_r ( )? 29) What does the unset ( ) function mean?
Q2) Attempt the following (4 marks):
1) What are differences between PHP constant and variable? 2) Explain the syntax for each loop with example. 3) What are the different types of arrays in PHP? 4) Explain methods to submit form. 5) What is a session in PHP? Explain it. 6) Explain multidimensional array in PHP with example. 7) What are the built in functions of string? 8) Explain if ...else statement in PHP using example. 9) Explain difference between client-side scripting and server-side scripting 10) Write a note on relational operators in PHP. 11) Explain Response and request objects in PHP. 12) Explain introspection in PHP. 13) Explain function with default parameter in PHP using example. 14) What is variable in PHP? Explain its scope with example. 15) What is the difference between for and for each in PHP 16) How to create cookies? Give an example. Explain passing values by reference with an example. 17) What is array? Explain different types of arrays in PHP. 18) What is the difference between a while loop and do while loop in PHP. 19) List various MYSQL Queries with their Syntax. 20) What are the different types of PHP variables? 21) What is the difference between GET and POST method? 22) Explain cookies in PHP 23) Explain any two string functions in PHP. 24) What are superglobals in PHP? 25) Write the functions performed by a web browser. 26) Explain self-processing form using example. 27) How inheritance is implemented in PHP? Explain using example.
Q3) Attempt the following (4 marks):
1) Write a PHP Program to check whether given year is leap year or not (use if else) 2) Write a PHP script to define an interface which has methods area () volume (). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume. 3) Write a PHP program to reverse an array 4) Write a PHP program to calculate area of circle and triangle. 5) Write a PHP script to accept user’s name and display in on next page. 6) Write a PHP program to display following operations on string: i) String concatenation ii) String comparison 7) Write a PHP program to display multiplication table of entered value. 8) Write a PHP Program to display reverse of a string. 9) Write a PHP program to find the sum of digit of a given number. 10) Write a PHP program to use multiple checkboxes to select hobbies 11) Write a code in PHP which accepts two strings from user and displays them after concatenation. Write a PHP function to calculate factorial of a number using recursion. 12) Write a PHP program to print greatest number among given 3 numbers. 13) Write a menu driven program in PHP to display arithmetic operations. 14) Write a PHP program to generate random password. 15) Write a PHP program to create login page and welcome user on next page.
Q4) Write a short note (3 marks):
1) Radio button and checkbox 2) Superglobals in PHP 3) Class and object 4) Explain advantages of PHP built in functions 5) Explain GET Method 6) List Advantages of PHP. 7) Form and Form elements 8) Logical operators in PHP 9) Validation in PHP