Convert each row and column of an HTML table into an array to collect table data.
$ Table = str_replace (""," {Td} ", $ table );
// Remove the HTML tag
$ Table = preg_replace ("'<[/!] *? [^ <>] *?> 'Si "," ", $ table); // OSPHP. COM. Cn open source
// Remove the white space characters
$ Table = preg_replace ("'([rn]) [s] +'", "", $ table );
$ Table = str_replace ("", "", $ table );
// Open source code OSPHP. COM. Cn
$ Table = str_replace ("", "", $ table );
$ Table = explode ('{tr}', $ table );
Array_pop ($ table); // PHP open source code
Foreach ($ table as $ key => $ tr ){
$ Td = explode ('{td}', $ tr );
Array_pop ($ td );
$ Td_array [] = $ td; // PHP open source code
}
Return $ td_array;
}
?>
Convert each row and column of an HTML table into an array to collect table data.
- // Convert each row and column of an HTML table into an array to collect table data
- Function get_td_array ($ table ){
- $ Table = preg_replace ("' ] *?> 'Si "," ", $ table );
- // OSPHP. COm. CN
- $ Table = preg_replace ("' ] *?> 'Si "," ", $ table );
- $ Table = preg_replace ("' ] *?> 'Si "," ", $ table );
- $ Table = str_replace ("
|
"," {Tr} ", $ table); // open-source OSPhP. COm. CN