Reply to Re: date()?

Your name:

Reply:


Posted by Pascual on 06/27/05 13:04

Philip Ronan skrev:
> "Ron Eggler @ work" wrote:
>
>
>>Hi,
>>
>>why does "$date = date(y-m-d);" return following (with
>>error_reporting(E_ALL))
>>Notice: Use of undefined constant y - assumed 'y' in
>>/srv/www/htdocs/web2/html/php/nospam/pop.php on line 48
>>... etc...
>
>
> Because you're supposed to provide this function with a string argument.
>
> Try putting quote marks around it like this:
>
> $date = date("y-m-d");
>

It is correct that you need to pass a string as the first argument to
date(), but there is not need to use double quote marks as this will
force PHP to parse the string looking for variables et.c.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация