MOST IMPORTANT QUESTIONS GENERALLY USED TO BE ASKED IN THE INTERVIEW ON STRING FUNCTIONS IN PHP
MOST IMPORTANT QUESTIONS GENERALLY USED TO BE ASKED IN THE INTERVIEW ON STRING FUNCTIONS IN PHP Q1. What is string() function? Ans: string() function is the manipulation of string. Q2. What is meant by ucfirst() function? Explain with an example. Ans: ucfirst() function is the upper case of the first word in a string. CODE => <?php $str="i am going to school"; $ucfirst=ucfirst($str); echo "$ucfirst"; ?> OUTPUT => I am going to school Q3. What is meant by lcfirst() function? Explain with an example. Ans: lcfirst() function is the lowercase of the first word in a string. CODE => <?php $str="Welcome to our school"; $lcfirst=lcfirst($str); echo "$lcfirst"; ?> OUTPUT => welcome to our school Q4. What is meant by ucwords() function? Explain with an example. Ans: ucwords() function is to provide uppercase to all words in a string. CODE => <?php $str="hello welcome to our cricket academy"; $ucwords=ucwords($st...