I'm trying to get an array to read the text from a file, and so far it isn't working. 
If you can help me, respond.

$fp = fopen ("./file.txt", "r");
$text = array ($fp);
sort ($text);
reset ($text);
while (list ($key, $val) = each ($text)) {
    echo "[".$key."] ".$val;
    echo "<br>";
fclose ($fp);

Currently all that does is print out "[0] Resource id #1"
Any help is GREATLY appreciated. Thanks in advance.

Reply via email to