Reply to global variables???

Your name:

Reply:


Posted by Patrick on 09/15/05 23:13

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);




--
Patrick A. Smith Assistant System Administrator
Ocean Circulation Group – USF - College of Marine Science
http://ocg6.marine.usf.edu Phone: 727 553-3334

The trouble with doing something right the first time is that nobody
appreciates how difficult it was. - La Rochefoucauld

[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

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