What is the fastest way to convert html table to php array?

前端 未结 6 1703
深忆病人
深忆病人 2020-12-21 08:52

are there build in functions in latest versions of php specially designed to aid in this task ?

6条回答
  •  余生分开走
    2020-12-21 09:15

    Use a DOM parser like SimpleXML to split the HTML code into nodes, and walk through the nodes to build the array.

    For broken/invalid HTML, SimpleHTMLDOM is more lenient (but it's not built in).

提交回复
热议问题