Page 1 of 1

NEW STARTER REQUIRING HELP WITH date() function

PostPosted: 02. June 2007 17:04
by jwcdemocrew
Hi

I have recently installed XAMPP on my PC - WIN XP PRO SP2 -

I have created a simple blank .php page and I am trying to learn php.

If I put phpinfo() on a line within the BODY tags, and run the page, it produces everything about php starting with the header -- PHP Version 4.4.6.

If I enter this line, <?php date("F j, Y, g:i a"); ?> it does not display anything.

I am a starter and confused. Would appreciate some help.

Thanks

Chris

PostPosted: 02. June 2007 17:18
by Wiedmann
If I enter this line,
Code: Select all
<?php date("F j, Y, g:i a"); ?>

it does not display anything.

http://www.php.net/manual/en/function.d ... #id3117635

PostPosted: 02. June 2007 17:41
by jwcdemocrew
Hi Wiedmann

Many thanks - very useful link, i shall study it in more detail later.

By putting " echo " in front of the " date()", like <?php echo date("F j, Y, g:i a"); ?> does return a value.

Thanks again,

Chris

PostPosted: 02. June 2007 17:42
by kevinduke
<?php echo(date("F j, Y, g:i a")); ?>