Preg_match_all
String integer alignment parsing.
Syntax: int preg_match_all (string pattern, string subject, array matches, int [order]);
return value: Integer
Function type: Data processing
&http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP;
Content Description
This function parses the string subject with the rule of pattern. The value returned by the result is placed in the array parameter matches and sorted according to the ordinal value order. The value of the parameter order has Preg_pattern_order and preg_set_order two kinds. If there is no order value, the system is automatically preg_pattern_order to the form. The return value is the number of results that conform to the comparison, and returns a value of False if there is no or error.
Usage examples
Examples of Preg_pattern_order
<?php
Preg_match_all ("|<[^>]+> (. *) </[^>]+>| U "," <div align=left>a test</div> ", $out, Preg_pattern_order);
Print $out [0][0]. ",". $out [0][1]. " \ n ";
Print $out [1][0]. ",". $out [1][1]. " \ n "
?>
The return value is
<b>example: </b>, <div Align=left>this is a test</div>
Example:, this is a test
Examples of Preg_set_order
<?php
Preg_match_all ("|<[^>]+> (. *) </[^>]+>| U "," <div align=left>a test</div> ", $out, Preg_set_order);
Print $out [0][0]. ",". $out [0][1]. " \ n ";
Print $out [1][0]. ",". $out [1][1]. " \ n "
?>
The return value is
<b>example: </b>, Example:
<div Align=left>this is a test</div>