|
Posted by Lexinho on 09/21/05 16:24
"Patrick" <psmith@marine.usf.edu> escreveu na mensagem
news:dgckps$il5$1@news1.usf.edu...
>
>
> $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 can't try it out here (no PHP installed), but as far as I remember:
$ZZZ = "C10";
${$ZZZ."dataFile"} = "/DATA2/BUOY/".$ZZZ."data.dat";
if (!(${"fp".$ZZZ."a"} = fopen(${$ZZZ."dataFile"}, "r")))
etc.
Was this your question?
---
lex
[Back to original message]
|