Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

PHP QUESTIONS

SECTION A: ATTEMPT ALL QUESTIONS/55 MARKS


1. What are the characteristics of php/3
2. Explain the components of flow control structures in php/3
3. What is an array? Outline the types of arrays in php/4
4. Why use php/4
5. What are the types of data type in php/4
6. Tell us the difference between a variable and a a constant/4
7. What is the scope of variable in php/3
8. What are the differences btn session and cookie/2
9. What are the ways to include file in php/2
10. What are the meanings of break and continue statements in php/2
11. What will be the output of the following code/2
<?php
$x=10;
$y=$x--;
echo $y;
?>
12. How can you create a session in php/4
13. How can you make a connection with my sql using php/4
14. What are the differences between Var_dump and print_r functions/2
15. What are the advantages of using php functions /4
16. What is the difference btn get and post method/4
17. What is the difference btn static and dynamic websites/2

SECTION B: CHOOSE ANY THREE QUESTIONS/30

18. A. Develop a php script to record 10 marks of the students in array then compute its
average and first five lowest marks of students.
B. Develop a php script the below pattern

*****
* *
* *
* *
***** /10

19. A. Develop a php program to print the factorial of anumber


B. Develop a php program to print the below format
12345678
1234567
123456
12345
1234
123
12
1
20. A. Discuss on the following different functions used in sorting an array? asort(), ksort(),
sort() and rsort()
B. Develop a php program to print the below stars format
*
**
***
****
*****
******
*******
********
*********

21. A. Develop a php program for finding the biggest number in an array without using any
array functions. Hint: $numbers = array(12,23,45,20,5,6,34,17,9,56,999);
B. Develop a php program for finding the smallest number in an array
Hint:$numbers= array(12,23,45,20,5,6,34,17,9,56);
22. . Develop a php program to print the following table
SECTION C: CHOOSE ANY ONE QUESTION/15
23. Develop a php program to allow the user to enter any number into user form then
produce the multiplication table of that entered number. Hint :

24.Suppose you have given the user login interface, homepage. Php, write a php script for
crating the below login page and validate the user’s credentials by using Exam as username and
Exam@2023 as password then when the user clicks on login button the logged user to
homepage. Php

You might also like