You are here: Re: global variables??? « PHP Programming Language « IT news, forums, messages
Re: global variables???

Posted by Jerry Stuckle on 09/17/05 19:21

Patrick wrote:
> Hi All,
>
> Not sure if this is possible or not. How can I have a global constant as
> a part of my variable names. As an example, I want all the ZZZ to equal
> "C10" in the snippet of code below.
>
> Why do I want to do this you ask? We are going to have anywhere from 60
> to 100 drifters in the ocean sending back gps data and a table of that
> data will be on a webpage. I am going to have separate text files with
> PHP in them for includes to build the table. I thought rather than
> having to create each file and assign the unique variables throughout
> the file for each unit I could just tell it once that it is unit C10
> save the page and then change the global and save as the next unit name.
> I hope I didn't present this query in a confusing manner. Any help or
> ideas you can give me are greatly appreciated.
>
> Regards,
> Patrick
>
>
> $ZZZdataFile = "/DATA2/BUOY/ZZZdata.dat";
> if (!($fpZZZa = fopen($ZZZdataFile, "r")))
> exit("Unable to open $ZZZdataFile.");
> while (!feof($fpZZZa))
> {
> // Assign variables to optional arguments
> $buffer = fscanf($fpZZZa, "%s %s %s %s %s %s",
> $ZZZdate $ZZZtime, $ZZZlat, $ZZZlon);
> }
> fclose ($fpZZZa);
>
>
>
>
I'd use a databaswe instead.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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