I would need a "script" that parses the following information in
'outdoor.txt'.
What i actually need are those variables (for example $yTemp). I'd do it
myself but my knowhow lacks ;D
outdoor.txt is input and variables are "output" which i need to make graphs
(jgraph)
-------OUTDOOR.txt-------
Date; Time; Temp øC
21.11.2003; 18:21:39; -2.69
24.12.2003; 23:10:45; 0.06
01.01.2004; 00:00:29; -5.75
01.01.2004; 00:43:37; -6.13
03.01.2004; 22:13:38; -8.44
05.01.2004; 07:38:58; -4.06
05.01.2004; 09:33:19; -4.50
-------OUTDOOR.txt-------
i know how to read the last line and get three variables:
....
$in_part = explode(";", $lastRow);
$in_pvmOUT = $in_part[0]; // Date = 05.01.2004
$in_aikaOUT = $in_part[1]; // Aika = 09:33:19
$in_lampoOUT = $in_part[2]; // Temp øC = -4.50
But i don't know how to get more values at once and feed it to the array:
Values should be in the following format:
$yTemp = array(-2.69, 0.06, -5.78); // Average temperatures for each month
$xAverage = array("Nov 2003","Dec 2003","Jan 2004");
It actually has values for every minute and every day.
So how should it be done if i want to draw a graph for "today", say
5.1.2004.
$yTempToday =
array(-4.38, -4.44, -4.44, -4.44, -4.44, -4.44, -4.44, -4.50, -4.50, -4.50,
-4.50, -4.44, -4.44, -4.50);
$xTimeDecimal = array(9.40, 9.42, 9.43, 9.45, 9.47, 9.48, 9.50, 9.52, 9.54,
9.56, 9.58, 9.59, 9.61, 9.63);
or $xTimeActual = array("09:23:37 ", "09:24:42", "09:25:46", "09:26:51",
"09:27:56", "09:29:00", "09:30:05", "09:31:10", "09:32:15", "09:33:19",
"09:34:24", "09:35:29", "09:36:34", "09:37:39") ;
-------OUTDOOR.txt-------
Date; Time; Temp øC
21.11.2003; 18:21:39; -2.69
24.12.2003; 23:10:45; 0.06
01.01.2004; 00:00:29; -5.75
01.01.2004; 00:43:37; -6.13
03.01.2004; 22:13:38; -8.44
05.01.2004; 09:23:37; -4.38
05.01.2004; 09:24:42; -4.44
05.01.2004; 09:25:46; -4.44
05.01.2004; 09:26:51; -4.44
05.01.2004; 09:27:56; -4.44
05.01.2004; 09:29:00; -4.44
05.01.2004; 09:30:05; -4.44
05.01.2004; 09:31:10; -4.50
05.01.2004; 09:32:15; -4.50
05.01.2004; 09:33:19; -4.50
05.01.2004; 09:34:24; -4.50
05.01.2004; 09:35:29; -4.44
05.01.2004; 09:36:34; -4.44
05.01.2004; 09:37:39; -4.50
-------OUTDOOR.txt-------