devinemke:
Using the following code:
$file = file('/home/user3/html/info/data.txt');
foreach ($file as $line)
{
$bits = explode("\t", trim($line));
for ($i = 0; $i < strlen($bits[1]); $i++)
{
$second_bit[] = $bits[1]{$i};
}
}
produced something similar, but not quite what I wanted. Here's the last portion of the output:
Array
(
[0] => 1
[1] => 3
[2] => 7
[3] => 1
[4] => 3
[5] => 8
[6] => 6
[7] => 7
[8] => 2
[9] => 2
)
As ran, and displayed with print_r, I'm posing the fourht "iteration" over the array. What is seems to be doing is adding each number, not as discreet entries (e.g., "22" or "137") but as elements - e.g., a "2", "2", "1", "3", "7"... How are these numbers going to be dealt with down the line? I'm not even sure how to feed them to any other function since they are "broken" up.
The code, as I read it, seems to be saying that as long as we have a valid non-zero number in $bits[1], we append it to $i, which $sedond_bit then picks up? Right, wrong?
Gracias,
monger