I nie mam pomysłu jak rozwiązać problem z tym ,żeby imie i nazwisko wyswietlało sie w jednej kolumnie pionowej ,a punkty w drugiej.
Próbowałem z <table> ale to chyba zły pomysł.
Cytat
<?php
$url = "2008.txt";
// $url = "http://www.formula1.com/results/driver/2008";
$tekst=file_get_contents($url);
?>
<?php
//preg_match_all('/<a href="\/results\/driver\/2008\/[0-9]{1,3}.html">(\D{1,20}.*)/',$tekst, $kierowcy);
preg_match_all('#<a href="/results/driver/2008/[0-9]{1,3}.html">(\D{1,20}.*)#',$tekst, $kierowcy);
for ($i = 22; $i <=43; $i++)
{
echo '<br>'.$kierowcy[1][$i];
}
?>
<?php
preg_match_all('#<td>(.*)</td> #',$tekst, $punkty);
for ($j = 0; $j <=21; $j++)
{
echo $punkty[1][$j];
}
?>
$url = "2008.txt";
// $url = "http://www.formula1.com/results/driver/2008";
$tekst=file_get_contents($url);
?>
<?php
//preg_match_all('/<a href="\/results\/driver\/2008\/[0-9]{1,3}.html">(\D{1,20}.*)/',$tekst, $kierowcy);
preg_match_all('#<a href="/results/driver/2008/[0-9]{1,3}.html">(\D{1,20}.*)#',$tekst, $kierowcy);
for ($i = 22; $i <=43; $i++)
{
echo '<br>'.$kierowcy[1][$i];
}
?>
<?php
preg_match_all('#<td>(.*)</td> #',$tekst, $punkty);
for ($j = 0; $j <=21; $j++)
{
echo $punkty[1][$j];
}
?>