Hello Folks!
First off, I know nothing about PHP, but I have a dilemma! I have a text file (purple text at the bottom) where each line has to be a variable...I have a PHP code (dark orange text) which works great, except when I try to read the new text file into flash, all variables that start with a number are invalid.
Is there a small amendment to the PHP code that can be written in that will allow all variables that start with a number to begin with say the letter "h", i.e. now reads "&403_2b" but if it could read "&h403_2b" that would save me sooooooo much time!
Below I have provided my PHP code that works fine, but without this new "tweak".
<?php
$file = trim (implode ("\r\n", file ("ttpwest.txt")));;
$file = explode ("\r\n", $file);
foreach ($file as $v) {
$line = explode (' ', $v, 2);
$buffer .= '&i' . $line[0] . '=' . $v . "\r";
}
$open = fopen ("phpttpwest.txt", 'w');
fwrite ($open, trim ($buffer));
fclose ($open);
?>
Below this is the text file I will be working with:
Westbound TPS Internal Processing Statistics at Thu Feb 2 10:38:02 2006
8.04-alpha-2003/04/23 started at Wed Feb 1 20:28:22 2006
Delta statistics baseline taken at Thu Feb 2 00:00:01 2006
Unpaired AVI Trip Information:
RTC Name Corr. AVI Paired Unpaired Unpaired Multiple Mainline
Rate Pen. AVI AVI Stale Corr. Detections
qew_1b 98.15% 78% 1834 74 0 10 0
dundas_1b 99.18% 84% 217 10 0 2 0
dundas_4b 100.00% 85% 52 0 0 0 0
dundas_1a 99.54% 89% 213 1 0 0 0
apple_1b 98.88% 84% 319 20 0 0 0
apple_4b 100.00% 86% 87 1 0 0 0
apple_1a 100.00% 79% 22 0 0 0 0
bronte_1b 99.42% 81% 153 14 0 0 0
bronte_4b 100.00% 81% 224 6 0 0 0
bronte_1a 100.00% 72% 17 0 0 0 0
gawa_1b 98.00% 85% 129 6 0 2 0
gawa_4b 95.74% 87% 44 0 0 0 0
traf_1b 100.00% 81% 139 4 0 0 1
traf_4b 96.83% 77% 116 2 0 0 0
traf_1a 100.00% 84% 21 0 0 0 0
403_1b 98.24% 75% 1699 72 1 4 0
403_4b 98.04% 78% 535 7 0 2 2
britt_1b 100.00% 78% 98 5 0 0 0
britt_4b 99.10% 90% 96 6 0 0 0
britt_1a 98.81% 87% 216 12 0 0 0
derry_1a 99.65% 87% 249 4 0 0 0
derry_1b 100.00% 77% 140 7 0 0 0
derry_4b 98.75% 79% 68 4 0 0 0
401_1a 99.05% 82% 180 6 0 2 0
401_1b 97.44% 75% 1423 105 0 42 0
401_4b 99.49% 85% 519 28 0 0 0