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 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python