[go: up one dir, main page]

0% found this document useful (0 votes)
37 views25 pages

PHP Practical 10114

This document contains 20 questions for a PHP lab assignment submitted by student Arshia Kaushal with roll number 10114 pursuing a BA program course. The questions cover topics like string manipulation, arrays, functions, recursion, conditional statements, form validation and more.

Uploaded by

Harsh Panchal
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)
37 views25 pages

PHP Practical 10114

This document contains 20 questions for a PHP lab assignment submitted by student Arshia Kaushal with roll number 10114 pursuing a BA program course. The questions cover topics like string manipulation, arrays, functions, recursion, conditional statements, form validation and more.

Uploaded by

Harsh Panchal
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/ 25

PHP LAB FILE

NAME - ARSHIA KAUSHAL


ROLL NO - 10114

COURSE - BA PROG.

SUBMITTED TO- Mr D.SINGH


QUESTION 1
Create a script to construct the following pattern
QUESTION 2
Write PHP Script for addition of two 2x2 matrices.
QUESTION 3
Write PHP Script to generate result and display grade
QUESTION 4
Write a program to calculate and print the factorial of a
number.
QUESTION 5
Write a program to count a specific characters in a string.
QUESTION 6
Write a PHP script to get the shortest/longest string length
from an array.
QUESTION 7
Write a PHP function that returns the lowest integer that is
not 0
QUESTION 8
Create a PHP page using functions for comparing three
integers and print the largest number.
QUESTION 9
Write a function to calculate the factorial of a number (non-
negative integer). The function accept the number as an
argument.
QUESTION 11
Create a PHP page which accepts string from user. After
submission that page displays the reverse of provided string.
QUESTION 12
Write a PHP script that checks whether a passed string is
palindrome or not? ( A palindrome is word, phrase, or
sequence that reads the same backward as forward, e.g.,
madam or nurses run)
QUESTION 13
Write a PHP script that finds out the sum of first n odd
numbers.
QUESTION 14
Create a login page having user name and password. On
clicking submit, a welcome message should be displayed if the
user is already registered (i.e.name is present in the database)
otherwise error message should be displayed.
QUESTION 15
Write a PHP script that checks if a string contains another
string.
QUESTION 16
Write a simple PHP program to check that emails are valid.
QUESTION 17
WAP to print first n even numbers.
QUESTION 18

Using switch case and dropdown list display a “Hello” message


depending on the language selected in drop down list.
QUESTION 19

Write a PHP program to print Fibonacci series using recursion.


QUESTION 20

Write a PHP script to replace the first 'the' of the following string with
'That'. Sample: 'the quick brown fox jumps over the lazy dog.'
Expected Result: That quick brown fox jumps over the lazy dog.

You might also like