dongyong3223 2011-06-09 18:25
浏览 53

PHP中的HTML到csv文件

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_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.

  • 写回答

1条回答

  • doufangmu9087 2011-06-09 18:28
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥15 fluent的在模拟压强时使用希望得到一些建议
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 Web.config连不上数据库
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退