[英]Making MySQL inserts from multiple dynamic HTML tables generated in PHP
I am working with a PHP file that generates many dynamic HTML tables using an included PHP library. 我正在使用一个PHP文件,该文件使用附带的PHP库生成许多动态HTML表。 This is a sample of the HTML output (I have listed only two tables and reduced their rows to 5 and 7 respectively) http://pastebin.com/PCwXyAjd
这是HTML输出的示例(我只列出了两个表,并将它们的行分别减少到5和7) 。http://pastebin.com/PCwXyAjd
I'm trying to fetch the data from the HTML table into a MySQL database. 我正在尝试将HTML表中的数据提取到MySQL数据库中。 I do not have access to view-source or edit that included PHP library so I cant make it write straight into MySQL when creating the HTML table.
我无权访问包含PHP库的视图源或进行编辑,因此在创建HTML表时无法使其直接写入MySQL。
Please how can I make my PHP file write this generated HTML data into MySQL? 请问如何使我的PHP文件将此生成的HTML数据写入MySQL? Thanks.
谢谢。
Okay so I found this http://simplehtmldom.sourceforge.net/ 好的,所以我找到了这个http://simplehtmldom.sourceforge.net/
It's a PHP Simple HTML DOM parser. 这是一个PHP简单HTML DOM解析器。 I am investigating it now and I think it should do the trick - it will parse the HTML contents and then I can post into MySQL - will keep you posted.
我现在正在研究它,我认为它应该可以解决问题-它会解析HTML内容,然后可以发布到MySQL中-可以让您发布。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.