Set A
Q: 1) Write a PHP script for the following: Design a form to accept a string. Write a
function to count the total number of vowels (a,e,i,o,u) from the string. Show the
occurrences of each vowel from the string. Check whether the given string is a
palindrome or not, without using built-in function. (Use radio buttons and the
concept of function. Use ‘include’ construct or require stmt.)
Q: 2) Write a PHP script for the following: Design a form to accept two strings from
the user. Find the first occurrence and the last occurrence of the small string in the
large string. Also count the total number of occurrences of small string in the large
string. Provide a text box to accept a string, which will replace the small string in the
large string. (Use built-in functions)
Set B
Q: 1) Write a PHP script for the following: Design a form to accept two numbers
from the user. Give options to choose the arithmetic operation (use radio buttons).
Display the result on the next form. (Use the concept of function and default
parameters. Use ‘include’ construct or require stmt)
Q: 2) Write a PHP script for the following: Design a form to accept two strings from
the user. Find whether the small string appears at the start of the large string.
Provide a text box to accept the string that will replace all occurrences of small
string present in the large string. Also split the large string into separate words.
Set C
Q: 1) Write a PHP script for the following: Design a form to accept the details of 5
different items, such as item code, item name, units sold, rate. Display the bill in the
tabular format. Use only 4 text boxes. (Hint : Use of explode function.)
Q: 2) Write a PHP script for the following: Design a form to accept two strings.
Compare the two strings using both methods (= = operator & strcmp function).
Append second string to the first string. Accept the position from the user; from
where the characters from the first string are reversed. (Use radio buttons)
symbol should not appear more than once. The dot (.) can appear at the most once
before @ and at the most twice or at least once after @ symbol. The substring
before @ should not begin with a digit or underscore or dot or @ or any other special character. (Use explode and ereg function.)
0 Comments
If anyone has Doubts or suggestions please let me know