InterviewSolution
Saved Bookmarks
| 1. |
Which one of the following preg PHP function is used to do a find and replace on a string or an array?(a) preg_replace()(b) preg_find()(c) preg_find_replace()(d) preg_findre()I had been asked this question in class test.Asked question is from Introduction to Preg in PHP topic in chapter Objects and Databases in PHP of PHP |
|
Answer» CORRECT choice is (a) preg_replace() The best I can EXPLAIN: In preg_replace() FUNCTION, after the replacement has occurred, the modified STRING will be returned and if no matches are found, the string will REMAIN unchanged. |
|