Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Perl]Knoten im Kopf -> Array in Tabelle ausgebe

Empfohlene Antworten

Moin zusammen,

irgendwie ist heute nen typischer Montag. Ich kriegs grad nicht auf die Reihe nen Array dynamisch in einer bestimmten Tabellenstruktur auszugeben.

Also folgendes:

Das Array "@datensaetze" hat das Format:


Index    Wert

0          Datum

1          zu index 0 gehörige Kundenzufriedenheitsnote

2          nächstes Datum

3          zu 2 gehörige Bewertung

...      

x-1       letztes Datum

x          zu x-1 gehörige Bewertung

Das Datum ist jeweils im Format "Monat/Jahr" als String gespeichert. Das ganze will ich in einer HTML Tabelle ausgeben. Und zwar soll die Tabelle so aussehen:

01/2000 | 02/2000 | 03|2000 | ... | 12/2000

note      |  note    |   not e    |     |  note

01/2001 | 02/2001  | .....             |12/2001

note      |   note     |                   |note

.....

Es soll also jeweils ein Jahr mit den Monaten 1 bis 12 als Überschrift in eine Zeile (sozusagen die geraden Array Indizes) und darunter in ner neuen Zeile die zugehörigen Noten. Das nächste Jahr soll dann in einer neuen Zeile anfangen...

Und irgendwie bekomm ich das grad absolut nicht auf die Reihe *seufz*

Kann da grad mal wer?

  • Autor

Hmpf ich honk .. 3 kaffee später hab ich es dann geschafft:


print "<h2>Bewertungen für: <font color=ff0066>$kundennamen[$k]</font></h2><br>
<table border=3 bordercolordark=000000 bordercolorlight=ff0066 frame=void width=100% cellspacing=0 cellpadding=4>";

for ($i=0;$i<=$#datensaetze;$i+=24)
{
#innere schleife von $i bis $i+12 schrittweite 1
print "<tr>";
for ($j=$i;$j<$i+24;$j+=2)
{
print "<th nowrap bgcolor=ff0066>$datensaetze[$j]</th>";
}
print "</tr><tr>";
for ($j=$i+1;$j<$i+24;$j+=2)
{
print "<td nowrap bgcolor=999999>$datensaetze[$j]</td>";
}
print "</tr>";
}
print "</table><br><hr><br>";
[/php]

Trotzdem dange fürs lesen :rolleyes:

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.