Parse HTML Table - PHP

John

I have an HTML table that I would like to parse in PHP to store into a MySQL Database. The HTML looks like this:

<tr><td>DATE</td><td>LOCATION</td><td><a href="URL">NAME</a></td></tr>

I would like to create a PHP function that returns in an array, the fields in capital letters. Does anyone know any php libraries that can do this, or should I be using a different language, as this may be complex. I don't know exactly how to do this with many tables on the page, but I am trying to parse the VEX events on RobotEvents. The table that I want to parse starts at line 465.

joews

As you're prepared to look beyond PHP, Nokogiri (Ruby) and Beautiful Soup (Python) are well-established libraries that parse HTML very well.

That doesn't imply that there are no suitable PHP libraries.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

HTML Table to Ms Excel Using PHP and jQuery

来自分类Dev

如何为PHP中的每个<html> <table> <tr> </ tr> </ tr> </ table> </ html>提供唯一的SESSION ID

来自分类Dev

PHP IntlDateFormatter :: parse输出时区

来自分类Dev

HTML TABLE PHP MySQL 在列标题单击时切换 MySQL 排序顺序 ASC DESC

来自分类Dev

在android的Parse Table中上传pdf文件

来自分类Dev

Parse HTML and get specific tag in IOS 8

来自分类Dev

Parse.com检索数据PHP

来自分类Dev

PHP parse_ini_file问题

来自分类Dev

使用PHP SDK查询Parse.com

来自分类Dev

Parse.com PHP新用户

来自分类Dev

在oci_parse中使用PHP $ _GET

来自分类Dev

PHP的parse.com parseQuery之间createdAt

来自分类Dev

来自php脚本的JSON.parse

来自分类Dev

访问 json.parse 多维数组 php

来自分类Dev

PHP连接html php代码

来自分类Dev

PHP:从 PHP 生成 HTML 文件

来自分类Dev

使用PHP在TABLE中创建TABLE

来自分类Dev

无法在data.table [,:=]函数中使用eval(parse(...))

来自分类Dev

Beautiful Soup parse Table 只返回最后一行

来自分类Dev

changing the font style of HTML table?

来自分类Dev

Scraping HTML table with Ruby and Nokogiri

来自分类Dev

Sorting HTML table by two columns

来自分类Dev

Center the text in a row of an HTML table

来自分类Dev

用HTML填充<Table>行

来自分类Dev

从mySQL提取到HTML TABLE

来自分类Dev

解析HTML表-PHP

来自分类Dev

在HTML内插入PHP

来自分类Dev

更新脚本PHP / HTML

来自分类Dev

HTML礼节中的PHP