Ask a question about regular expressions
额……
额…… 2018-11-04 20:38:55
0
0
877
<?php
$a=12;
$reg='/1*/';
preg_match_all( $reg, $a, $match);
var_dump($match);
exit;

//Output result

array(1) {

[0]=>

array(3) {

[0]=>

string(1) "1"

[1]=>

string(0) ""

[2]=>

string(0) ""

}

}


Why is it output 3 subscripts? Where did the third subscript come from?


额……
额……

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!