I need to get only values for “since”, instead I get all values with the same name of class.
$html = file_get_html("http://www.transfermarkt.co.uk/scottish-premiership/verletztespieler/wettbewerb/SC1/plus/1");
foreach ($html->find('.zentriert') as $element){
echo $element->plaintext ."\n";
}
Result after running the code
Club Age Nation since until
28
Dec 27, 2016 Feb 24, 2017
33
Dec 24, 2016 Feb 28, 2017
25
Jan 31, 2017 Feb 28, 2017
19
…
I need to retrieve only the data from the column I selected.
I used this code to get the names for players i want to do the same for the column SINCE
foreach ($html->find('.hauptlink') as $element) {
$player_name = trim($element->plaintext);
echo $player_name ."\n";
}
At the end what i need to achieve is to get the player name, nation, injury, since and until values for earch row.