http://www.tablesleague.com/england/
How can I get the information from the league table on this website into an array using PHP?
I don't know how to isolate elements on a web page using the cURL() or file_get_contents() functions.
I'd ultimately like to store the position, wins, losses etc of each team in a multidimensional array (for each league), and then in my database, to access across my whole site.
All this information is on the website, I just need to retrieve it. Then I'd insert it into my database table, which would look like this:
team_name | position | games_played | wins | losses | draws | points | next_game | uniqueid|
An example of one array that I'd like to achieve would look something like this:
$epl = array(
//
array("Arsenal", 3, 15, 8, 2, 5, 29, "Chelsea"),
array("Chelsea", 1, 15, 12, 0, 3, 39, "Arsenal"),
etc....
)
?>
I am very unfamiliar with functions such as cURL
and `file_get_contents(), and also unfamiliar with simple html dom parser, so as much detail as possible would be appreciated.
Thanks in advance.