Just trying to embrace the innerWords of some td-elements with <span class="brc">Words</span>.
<td class="views-field views-field-summoner-name-1"> Zeit für ein dududuDUELL </td>
<td class="views-field views-field-summoner-name-1"> EloDrop </td>
<td class="views-field views-field-summoner-name-1"> HighPINGklärtGG </td>
<td class="views-field views-field-summoner-name-1"> BlaViShi </td>
<td class="views-field views-field-summoner-name-1"> Bruteforce tv </td>
The td-class views-field cant’t be used for it. My current codes is:
<?php
$url = "http://competitive.euw.leagueoflegends.com/de/ladders/euw/current/ranked_team_3x3";
preg_match('#<table class="views-table cols-6"[^>]+>[\w\W]*?</table>#i', file_get_contents($url), $match);
echo $match[0];
$brc = array("Zeit für ein dududuDUELL","OP Scheisse","Selbstzerstörungsknopf","EloDrop","HighPINGklärtGG","BlaViShi");
echo preg_replace(I dont know how this works);
?>
If
$brcis an array of strings you want to wrap with thespanyou could loop through them and usestr_replace: