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.

Datumsformat spinnt

Empfohlene Antworten

Veröffentlicht

Hi, habe folgendes Probelm:

Ich möchte nur die aktuelle Zeit in PHP ausgeben. Der Quellcode sieht so aus :

<?php

$zeit = time(); // Aktuelle Zeit in Sekunden

$datum = getdate();

// Diese Ausgabe sagt dem Benutzer nur welchen Tag wir haben, und wie spät es ist!

echo "Uhrzeit: " . $datum[hours] . ":" . $datum[minutes] . " Am ". $datum[weekday] . " den " . $datum[mday] . "." . $datum[mon] . " " . $datum[year];

?>

ABER die Ausgabe sieht so aus:

Uhrzeit: 13:2 Am Thursday den 4.12 2003

Mich nervt das die Uhrzeit so da steht: 13.2

ich will das es so aussieht 13:02

Was kann ich denn da machen ????

Danke im vorraus

McMaiers

Danke,

und wie gebe ich das aus ??

echo ???;

geht irgendwie ned

:(

AHHH geht schon habs danke !!!


echo date( "H:i \a\m l \d\e\n d.m.Y",strtotime("now"));
[/PHP]

kommt ne fehlermeldung?

[edit] war ich wohl zu langsam :)[/edit]

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.