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.

Tabellenbreite??

Empfohlene Antworten

Veröffentlicht

Mein Code:

while(list($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis)) {

echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"3\" width=\"100%\">";

echo "<tr>";

echo "<td>$kdnummer</td>";

echo "<td> $name</td>";

echo "<td>$vorname</td>";

Mein Problem:

Die Schleife da oben gibt mir alle Daten aus. In jeder neuen Zeile stehen die Daten eines Benutzers.

Aber die Spalten haben in jeder Zeile eine andere Breite! Mit dem oberen Code ist jede Spalte so brreit, wie das Wort, das drin steht.

habe schon:

z.B.:

echo "<td width=20>$kdnummer</td>";

ausprobiert.

aber es funzt einfach nicht!

Danke schon im vorraus für jegliche Art der Bemühungen!

Moin !

Probiers mal so:

echo '<table border="1" cellspacing="1" cellpadding="3" width="100%">';
while(list
($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis)) {

echo "<tr>
<td>$kdnummer</td>
<td> $name</td>
<td>$vorname</td>";
...
[/PHP]

wenn Du den <table>-Tag in der While Schleife hast, wird bei jedem Durchlauf eine neue Tabelle angelegt, daher die unterschiedlichen Spaltenbreiten.

Hoffe das hilft Dir weiter !

gruß

Christian

Originally posted by Chris11

Mein Code:

while(list($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis)) {

echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"3\" width=\"100%\">";

echo "<tr>";

echo "<td>$kdnummer</td>";

echo "<td> $name</td>";

echo "<td>$vorname</td>";

schonmal versucht den tabellen kopf vor der schleife auszugeben?

und den colspan tag zu setzen?

echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"3\" width=\"100%\">";

echo "<tr>";

while(list($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis))

{

echo "<td width=\"20\" colspan=\"1\">$kdnummer</td>";

echo "<td width=\"20\" colspan=\"1\"> $name</td>";

echo "<td width=\"20\" colspan=\"1\">$vorname</td>";

...

}

echo "</tr></table>";

Originally posted by Chris11

Mein Code:

while(list($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis)) {

echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"3\" width=\"100%\">";

echo "<tr>";

echo "<td>$kdnummer</td>";

echo "<td> $name</td>";

echo "<td>$vorname</td>";

schonmal versucht den tabellen kopf vor der schleife auszugeben?

und den colspan tag zu setzen?

echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"3\" width=\"100%\">";

echo "<tr>";

while(list($kdnummer,$loginname,$name,$vorname,$firma,$strasse,$strnummer,$ort,$plz,$email,$vorwahl,$telefon,$fax)=mysql_fetch_row($ergebnis))

{

echo "<td width=\"20\" colspan=\"1\">$kdnummer</td>";

echo "<td width=\"20\" colspan=\"1\"> $name</td>";

echo "<td width=\"20\" colspan=\"1\">$vorname</td>";

...

}

echo "</tr></table>";

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.