Difference between revisions of "Hello, World! (php)"

From wikieduonline
Jump to navigation Jump to search
 
(4 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
   
 
   
 
   $currentDate = date('Y-m-d h:i:s A'); // Format: YYYY-MM-DD hh:mm:ss AM/PM
 
   $currentDate = date('Y-m-d h:i:s A'); // Format: YYYY-MM-DD hh:mm:ss AM/PM
   echo "Today is: $currentDate \n"; // Output: 2024-02-15 06:23:25 PM  
+
   echo "Today is: $currentDate \n";     // Output: 2024-02-15 06:23:25 PM  
 
   
 
   
 
   echo "We are running PHP version: ";
 
   echo "We are running PHP version: ";
Line 15: Line 15:
 
   
 
   
 
   # For more information
 
   # For more information
   #phpinfo ();
+
   # [[phpinfo]] ();
  
 
== Related ==
 
== Related ==

Latest revision as of 18:00, 22 February 2024

<?php
  echo "Hello World!";
  echo "We are learning PHP!";

Other examples[edit]

<?php
 echo "Hello World! \n";
 echo "We are a new app! \n";

 $currentDate = date('Y-m-d h:i:s A'); // Format: YYYY-MM-DD hh:mm:ss AM/PM
 echo "Today is: $currentDate \n";     // Output: 2024-02-15 06:23:25 PM 

 echo "We are running PHP version: ";
 echo phpversion ();

 # For more information
 # phpinfo ();

Related[edit]

See also[edit]

Advertising: