5312346789101112131415161718192021222324252627282930
Ask how to get1~30 these values in the label? Best to use Simple_html_dom to get it? Know the friend said Oh! If not with this class also can!
Reply to discussion (solution)
$s =<<
<>
5312346789101112131415161718192021222324252627282930txt;preg_match_all ("#> (\d+) () #isU", $s, $m);p rint_r ($m [1 ]);
5312346789101112131415161718192021222324252627282930html; $dom = new DOMDocument; $dom->loadhtml ($html $TR = $dom->getelementsbytagname (' tr '); $str = "; foreach ($tr as $key + = $value) {$value = Trim (Str_replace (php_eo L, ', $value->nodevalue)); $value = preg_replace ('/\s\s+/', ' | ', $value); $value = substr ($value, Strrpos ($value, ' | ') +1); Var_dump ($value); $str. = $value;} Var_dump ($STR);? >
$dom = new DOMDocument; $dom->loadhtml ($html); $tr = $dom->getelementsbytagname (' tr '); $str = "; foreach ($tr as $key = $value) {$value = Trim (Str_replace (Php_eol, ", $value->nodevalue)), $value = preg_replace ('/\s\s+/', ', ', $value); $str. =$ Value. ', ';} $str = substr ($str, 0,-1); Var_dump ($STR);
$s =<<< HTML 1 2 3 4 6 7 8 9 ten 13 (+)--- - html;include ' simple_html_dom.php '; $p = str_get_html ($s); foreach ($p->find (' TD ') As $i = $r) { if ($i) echo $r->text (), Php_eol;}
1
2
3
4
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21st
22
23
24
25
26
27
28
29
30
$s =<<< HTML 1 2 3 4 6 7 8 9 ten 13 (+)--- - html;include ' simple_html_dom.php '; $p = str_get_html ($s); foreach ($p->find (' TD ') As $i = $r) { if ($i) echo $r->text (), Php_eol;}
1
2
3
4
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21st
22
23
24
25
26
27
28
29
30
Thanks a lot, lz!.