Professional Documents
Culture Documents
Programming in PHP: Instructions To Candidates
Programming in PHP: Instructions To Candidates
INSTRUCTIONS TO CANDIDATES :
1. SECTION-A is COMPULSORY consisting of TEN questions carrying T WO marks
17922 17922
each. 17922 17922 17922 17922 17922 17922 17922
2. SECTION-B contains SIX questions carrying TEN marks each and students have
to attempt any FOUR questions.
SECTION-A
17922 1.
17922 Write briefly
17922 : 17922 17922
.r c
a) What these tags specify in PHP : <?php and ?>
m
17922 17922 17922 17922 17922 17922 17922 17922 17922
e
b) Can we run PHP from HTML file? If yes, how?
p
c) Why PHP is known as scripting language?
o
a .r c
17922 17922 17922 17922 17922 17922 17922 17922 17922
p
d) Write a program in PHP to calculate Square Root of a number.
17922 17922
e) How can we create
17922
b r links in PHP17922
17922
pages? 17922
a
f) What is the function of foreach construct in PHP?
rp
17922 17922 g) What is the purpose
17922 of “nl2br “string
17922 17922 function?17922 17922 17922 17922
17922 1|M
17922 c o d e - 717922
4083 17922 17922 17922 17922 ( S 317922
)- E-1 17922
SECTION-B
17922 17922 17922 17922 17922 17922 17922 17922 17922
3. a) Write a program to find average of first ten natural numbers using for loop.
17922 17922 17922 17922 17922 17922 17922 17922 17922
b) Write a note on various library functions available in PHP.
4. What is the difference between Session and Cookie? Write a program to create a session,
17922 17922 to set a17922
value in session,
17922and to remove
17922data from a17922
session. 17922 17922 17922
17922
7.
17922 17922 17922 17922
o m
What are different types of sorting functions in PHP? Explain with example in detail.
17922 17922 17922 17922
m
17922 17922
p e o
a .r c
17922 17922 17922 17922 17922 17922 17922 17922 17922
r p e
17922 17922 17922
b 17922 17922
a
17922
p
17922 17922 17922
rp
17922 17922 17922 17922 17922 17922 17922 17922 17922
17922 2|M
17922 c o d e - 717922
4083 17922 17922 17922 17922 ( S 317922
)- E-1 17922