Forum Moderators: coopster
<?php
$today = getdate();
print_r($today);
?>
The above example will output something similar to:
Array
(
[seconds] => 40
[minutes] => 58
[hours] => 21
[mday] => 17
[wday] => 2
[mon] => 6
[year] => 2003
[yday] => 167
[weekday] => Tuesday
[month] => June
[0] => 1055901520
)
I've already added the necessary 5 hours on (I'm in the UK...
Where do I put the date_default_timezone_set('Europe/London')? When I put it onto my page and refresh it the page doesn't load!
error_reporting(E_ALL);
ini_set('display_errors','On');
<?php
$today = getdate();
print_r($today);
?>
The above example will output something similar to:
Array
(
[seconds] => 40
[minutes] => 58
[hours] => 21
[mday] => 17
[wday] => 2
[mon] => 6
[year] => 2003
[yday] => 167
[weekday] => Tuesday
[month] => June
[0] => 1055901520
)
...and it does! But how do I echo just the weekday, for example?
My apologies if this is really basic stuff, I've just not dealt with this before :s
echo $today['seconds'];