[PHP] error notice - valid code

2002-09-30 Thread Pablo Oliva

Notice: Use of undefined constant year - assumed 'year' in
c:\apache\htdocs\jotr\includes\globalFooter.php on line 3

?php
$year = getdate();
$print_year = $year[year];
?

Is this not valid code?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] error notice - valid code

2002-09-30 Thread Martin Towell

This is what you're really after - quoting the index

?php
$year = getdate();
$print_year = $year[year];
?


-Original Message-
From: Pablo Oliva [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 1:03 PM
To: [EMAIL PROTECTED]
Subject: [PHP] error notice - valid code


Notice: Use of undefined constant year - assumed 'year' in
c:\apache\htdocs\jotr\includes\globalFooter.php on line 3

?php
$year = getdate();
$print_year = $year[year];
?

Is this not valid code?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] error notice - valid code

2002-09-30 Thread Tom Rogers

Hi,

Tuesday, October 1, 2002, 1:02:46 PM, you wrote:
PO Notice: Use of undefined constant year - assumed 'year' in
PO c:\apache\htdocs\jotr\includes\globalFooter.php on line 3

PO ?php
PO $year = getdate();
PO $print_year = $year[year];
?

PO Is this not valid code?



No
It should be
   $print_year = $year['year']
-- 
regards,
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php