jeudi 11 avril 2013

le temps en php



en peut afficher le temps dans PHP à tel manière différent :

  • getdate:
    • syntaxe:
      <?
      print_r(getdate());
      ?>
    • affichage:
      Array ( [seconds] => 57 [minutes] => 37 [hours] => 15 [mday] => 11 [wday] => 4 [mon] => 4 [year] => 2013 [yday] => 100 [weekday] => Thursday [month] => April [0] => 1365691077 ) 
     
  • time:
    • syntaxe:

      echo time();
    • affichage:
      1365691363
  • date:
    • syntaxe:

      echo date("H:M:S");
    • affichage:
      15:Apr:th

0 commentaires :

Enregistrer un commentaire