Subject: Web Based Application Subject Code: 22616
Development with PHP Semester: 6th Semester Course: Computer Engineering
Laboratory No: Name of Subject Teacher: Prof. Sneha
Patange Name of Student: Yash Dinesh Kadam Roll Id: 21203A0009
Experiment No: 5
Title of 1. Write a PHP program to
Experiment a) Calculate length of string b) Count the number of words in string- without using string functions 2. Write a simple PHP program to demonstrate use of various built in string functions.
Practical related questions:
1. How to find text within a string?
Using strpos() The strpos() function in PHP searches for the first occurrence of a substring ("needle") within another string ("haystack"). It's case-sensitive, meaning it distinguishes between lowercase and uppercase letters. Example: 2. How to convert text in lowercase into title case? We can using ucwords() and strtolower()
3. Write a script to find length of the string “Vidyalankar Polytechnic”?
Exercise:
1. Write an example to remove HTML tags from a string in php?
Ans: Strip_tags() is function to remove HTML tag in the string
2. Count the number of words in string- without using string functions.
3. Write a simple PHP program to demonstrate use of various built in string functions. 4. Write a script for given string is palindrome or not.