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.

Probleme bei PHP Array

Empfohlene Antworten

Hallo,

ich habe folgendes Problem. Ich möchte Werte aus einer MySQL-DB in einer Grafischen Darstellung anzeigen als Kurvendiagramm. Dazu habe ich das Script PHPlot heruntergeladen.

Das Skript erfordert die Übergabe der Daten in der Form

$example_data = array(

array('Spaltenbezeichner',Wert1,Wert2,Wert3,Wert4),

array('Spaltenbezeichner',Wert1,Wert2,Wert3,Wert4)

)

Nun habe ich das MySQL-Eregbnis so in dieses Array einzubinden versucht:

$example_data = array(

while ($result = mysql_fetch_array($query,MYSQL_ASSOC))

{

array('$result[DatumJJWW]',$result[Eingang],$result[Ausgang],$result[Rueckstand],$result[WV]);

}

);

Er meckert mir dann schon einen Fehler in der Zeile mit dem While an. Wie kann ich das Problem lösen?

Danke.

Ich persönlich würde es so lösen...


	$example_data = array();

	while ($row = mysql_fetch_assoc($query)) {		

		$example_data[] = array($row['DatumJJWW'],$row['Eingang'],$row['Ausgang'],$row['Rueckstand'],$row['WV']);

	}

thx

10zeichenschmorrens

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

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.