InterviewSolution
Saved Bookmarks
| 1. |
Which one of the following functions are used to search a string?(a) preg_match(b) preg_search(c) preg_find(d) preg_foundThe question was asked by my school principal while I was bunking the class.I'd like to ask this question from Introduction to Preg in PHP in chapter Objects and Databases in PHP of PHP |
|
Answer» CORRECT choice is (a) preg_match Explanation: The function preg_match() searches string for PATTERN and it returns true if pattern EXISTS, and false otherwise. The function returns 1 if SEARCH was SUCCESSFUL else returns 0. |
|