include ("inc/data.inc.php");
foreach($data as $ausgabe)
{list($spalte1, $spalte2,) = $ausgabe;include ("inc/zugabe.inc.php");
foreach ($zugabe as $ausgabe)
{list($spalte3, $spalte4,) = $ausgabe;echo "\n\n<tr><td class='nr'>" , ++$count , "</td>\n<td class='blau'>";
echo $spalte1 , "</td>\n<td class='blau'>";
echo $spalte2 , "</td>\n<td class='gelb'>";
echo $spalte3 , "</td>\n<td class='gelb'>";
echo $spalte4 , "</td>\n</tr>";}
}
Bitte keine Chaosformatierung im Code.
Warum eine Schleife in der Schleife?
Die Dateien sind schlieslich nebeneinander,
nicht eine Datei im Text der anderen, darzustellen.
~~~php
include ("inc/data.inc.php");
$text1 = $data;
include ("inc/zugabe.inc.php");
$text2 = $zugabe;
$cnt = 0;
while( $cnt<202 ){
# eine Abbruchbedingung
break if(
$text1[$cnt][0] eq '' or
$text1[$cnt][1] eq '' or
$text2[$cnt][0] eq '' or
$text2[$cnt][1] eq ''
);
echo "\n\n<tr>",
" <td class='nr'>" , $cnt , "</td>\n",
" <td class='blau'>" $text1[$cnt][0] , "</td>\n",
" <td class='blau'>" $text1[$cnt][1] , "</td>\n",
" <td class='gelb'>" $text2[$cnt][0] , "</td>\n",
" <td class='gelb'>" $text2[$cnt][1] , "</td>\n",
"</tr>";
# Incrementor am Ende
$cnt++;
}
Keine Ahnung ob das jetzt properes php ist.
mfg Beat;
--
/|
<°)))o>< __ / | /|
/__\ _|___/ | ><o(((°>
OvVVvO __ | ><o(((°>
<°)))o>< /v v\/ |
<°)))o>< ^ ^/_/_ ><o(((°>
^^^^/___/
---- ><o(((°>
><o(((°> ><o(((°>
<°)))o>< ><o(((°>o
/|
<°)))o>< __ / | /|
/__\ _|___/ | ><o(((°>
OvVVvO __ | ><o(((°>
<°)))o>< /v v\/ |
<°)))o>< ^ ^/_/_ ><o(((°>
^^^^/___/
---- ><o(((°>
><o(((°> ><o(((°>
<°)))o>< ><o(((°>o