PHP beginner |
|
Hier
<?php
$file = file("http://www.eredivisie.nl/default.aspx?activetab=standings");
$i = 0;
echo "<table width='450'>
<tr>
<td width='5%'><b>#</b></td>
<td width='55%'><b>Club</b></td>
<td width='20%'><b>Wedstr.</b></td>
<td width='20%'><b>Punten</b></td>
</tr>";
foreach($file as $onderdeel)
{
if(eregi("<td height=\"15\" bgcolor=\"#d1e760\">", $onderdeel))
{
$i++;
echo "<tr>
<td width='5%'>".$i."</td>
<td width='55%'>";
echo strip_tags($onderdeel)."";
}
if(eregi("<td width=\"25\" class=\"uitslag\" style=\"text-align:center\">", $onderdeel))
{
echo "</td>
<td width='20%'>";
echo strip_tags($onderdeel)."";
}
if(eregi("<td width=\"25\" height=\"15\" bgcolor=\"#d1e760\" style=\"text-align:center\">", $onderdeel))
{
echo "</td><td width='20%'>";
echo strip_tags($onderdeel)."<br />";
echo "</td></tr>";
}
}
echo "</table>";
?>
<?php $file = file("http://www.eredivisie.nl/default.aspx?activetab=standings"); $i = 0; echo "<table width='450'> <tr> <td width='5%'><b>#</b></td> <td width='55%'><b>Club</b></td> <td width='20%'><b>Wedstr.</b></td> <td width='20%'><b>Punten</b></td> </tr>"; foreach($file as $onderdeel) { if(eregi("<td height=\"15\" bgcolor=\"#d1e760\">", $onderdeel)) { $i++; <td width='5%'>".$i."</td> <td width='55%'>"; } if(eregi("<td width=\"25\" class=\"uitslag\" style=\"text-align:center\">", $onderdeel)) { <td width='20%'>"; } if(eregi("<td width=\"25\" height=\"15\" bgcolor=\"#d1e760\" style=\"text-align:center\">", $onderdeel)) { echo "</td><td width='20%'>"; } } ?>
|