Reply to Re: [PHP] beginner needs help!

Your name:

Reply:


Posted by John Nichel on 05/12/05 22:22

Clinton, Rochelle A wrote:
> Dear Much Needed Advisor,
>
> I am definitely a PHP novice and making some code changes to a PHP
> script.
>
> I need to change a declared output file to include the date as an
> extension.
>
> My file is declared at the beginning of the script as:
>
> var $exportFile = "Export.txt";
>
> I need it to be, for instance, Export.051205.txt.
>
> I have played around with the date function many ways:
>
> Ex 1:
>
> var $exportFile = "Export" . date("mdy");
>
> Ex 2:
>
> $file = "Export";
>
> $ext = date("mdy");
>
> var $exportFile = $file . $ext;
>
> I can't seem to get anything to work.

What is not working with it? Did you want the .txt extension on the end?

$exportFile = "Export." . date ( "mdy" ) . ".txt";

> Also, could you point me to somewhere where I can learn the difference
> between declaring variables as:
>
> $exportFile = "Export.txt";
>
> and
>
> var $exportFile = "Export.txt"

I *think* they're the same. Personally, I've never used 'var' in PHP,
and all has worked fine.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com

[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

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