3, preg_replace string comparison parsing and replacement. Syntax: mixed preg_replace(mixed pattern, mixed replacement, mixed subject); Return value: Mixed type data Function type: Data processing Description: This function uses pattern rules to parse and compare the string subject, and the string to be replaced is the parameter replacement. The return value is mixed type data, which is the string result after substitution. Usage example, the return value in the following example is $startDate = 6/19/1969.
4, preg_split splits the string according to the specified rules. Syntax: array preg_split(string pattern, string subject, int [limit]); Return value: array Function type: Data processing Description: This function can separate strings according to specified rules. The return value after cutting is an array variable. The parameter pattern is the specified rule string, the parameter subject is the string to be processed, and the parameter limit can be omitted, indicating the maximum number of consistent values to be processed. |