Click to See Complete Forum and Search --> : A simple PHP question


weee
02-19-2006, 10:31 PM
I saw that line in a page that I need to update and I really would like to know what's the input of this line and what it does?

<?php $day_name = date("D"); echo ("$day_name\n"); ?>

NogDog
02-19-2006, 10:43 PM
It's going to output the 3-character abbreviation of the current day of the week (Mon, Tues, Wed, etc.) followed by a newline character. It could be written a bit more simply as:

<?php echo date("D") . "\n"; ?>