开发者

HTML to csv file in php

I would like to read a HTML file as and convert the table content inside the html to csv format file using php.

In general, in a directory HTML, i have a list of html files say

KMC_Doctors开发者_JAVA百科_list_A.html  
KMC_Doctors_list_B.html  
KMC_Doctors_list_C.html  
....
KMC_Doctors_list_Z.html

I would like to read these HTML file and the write its table content to a CSV file.

Can any one help me in this regard.


Get ready for some reading: fputcsv will write in the csv format. But you need to understand regular expressions preg_match and preg_match_all will be very useful in the process. There's no quick way to turn html into csv.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜