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

前端 未结 6 1688
深忆病人
深忆病人 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:02

    String replace and explode would work if the HTML code is clean and always the same, as soon as you have new attributes it will brake. So only dependable solution would be using regular expressions or XML/HTML parser. Check http://php.net/manual/en/book.dom.php

提交回复
热议问题