This collection of PHP Multiple Choice Questions and Answers (MCQs): Quizzes & Practice Tests with Answer focuses on “String”.
1. A sequence of characters that is processed as a unit is called ______
2. How many approaches you can use to create a string in PHP?
3. Which kind of string can treats special characters inside quotes?
A Single quote string
B Double quote string
C Both A and B
D None of the above
4. Which is not a Built-in function for string in PHP?
5. What’s the use of trim() function in PHP?
A to remove underscore
B to remove uppercase alphabet
C to remove lowercase alphabet
D to remove whitespaces
6. What is the result of the following PHP code?
<?php echo strpos("Welcome to StackHowTo!", "to"), " \n"; ?>
7. If you want to compare two strings which of the following function can be used?
8. Which of the following function used to convert a string to uppercase?
9. Which of the following functions can be used to concatenate array elements to a single string?
10. What is the result of the following PHP code?
<?php $url = "adm[email protected]"; echo ltrim(strstr($url, "@"),"@"); ?>