quadratic
I can't seem to solve the exercise at the end of Chapter 2 where we are asked to enhance the hello_with_time.php file. I get the correct time but no date.
Here is my php code:
<?php
// Get the current time in a readable format
$currentTime = date( "g:i:s a" );
// Get the current date in a readable format
$currentDate = date( "M j, Y" );
// Display greeting, time and date to the visitor
echo "Hello, world! The current time is $currentTime on $currentdate";
?>
I think I am going to enjoy the book and look forward to learning PHP!
|