Thank you. That answered a lot for me.
By the way, I love your music playlist php script. Very cool indeed.
Ok so let me run through some of the examples to make sure I get this:
echo date("l");
print the date(/*return in the format of l*/ "l"); //which is how we format the date if we want to know the day of the week.
//l = A full textual representation of the day of the week = Sunday through Saturday
/*we didn't supply a specific date/timestamp so because of the optional, the code chooses our current date and inputs into the paramater area which is denoted with [ ] because that means this is an optional parameter placement for the function.*/
#So in that example we only formatted today's date and printed it.
(Not tested)
So, if I want the day of the month:
echo date("d");
If I wanted the day and the week:
echo date("d,W");
Day, Week, Month:
echo date("d,W, F");
Seem right?
Ok, so those are when we don't supply a particular date.
But what about when we do. Is this an example of that?
// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", mktime(0, 0, 0, 7, 1, 2000));
Why does this example include mktime instead of just being:
// Prints: July 1, 2000 is on a Saturday
echo "July 1, 2000 is on a " . date("l", (7, 1, 2000));
I am still confused by the comma in:
string date ( string $format [, int $timestamp] )
See how the comma is inside the optional but in the previous example the comma is outside the optional?
Thanks so much for taking the time out to explain these features of the language. It is very interesting and mind boggling at the same time.