Convert each line of an HTML table to an array in CSV format
$ Table = str_replace ("
// Remove the HTML tag
$ Table = preg_replace ("'<[/!] *? [^ <>] *?> 'Si "," ", $ table );
// Remove the white space characters
$ Table = preg_replace ("'([rn]) [s] +'", "", $ table );
// Open source code OSPhP. COm. CN
$ Table = str_replace ("", "", $ table );
$ Table = str_replace ("", "", $ table );
$ Table = explode (", {tr}", $ table );
// Open source code OSPHP. COM. Cn
Array_pop ($ table );
Return $ table;
}
?>
Convert each line of an HTML table to an array in CSV format
- // Convert each line of the HTML table into an array in CSV format
- Function get_tr_array ($ table ){
- // PHP open source code
- $ Table = preg_replace ("' ] *?> 'Si ", '"', $ table );
- $ Table = str_replace ("
| ", '",', $ Table );
"," {Tr} ", $ table); // open-source OSPhP. COm. CN