OK, well I did a debug and this is whats coming out:

   [0] =>,,

Should I use fgets?

On 7/22/06, Dave W <[EMAIL PROTECTED]> wrote:

OK, so I have this text file that holds a list of ip addresses like this:,,,,

Currently, here is my code:

    $file = 'ip.txt';
    $fh = fopen($file, 'r');
$theData = fread($fh, filesize($file));
$ips = array($theData);

Since it's a numeric array, I shouldn't need quotes around the ip octets.
When I try to echo certain parts of the array like:

echo $ips[0];

It's returning the whole array. The text file is exactly like an array so
it shouldn't be a problem.

Dave W

Dave W

Reply via email to