Re: array problems

From: Date: Thu, 27 Nov 2003 02:53:51 +0000
Subject: Re: array problems
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-171158@lists.php.net to get a copy of this message
Curtis Maurand wrote:
Sorry, its a typo. it should be: $city = "Ipswitch"; $city_found = 0; $contentfile = fopen("content.txt", "r"); while (!feof($contentfile) && $city_found == 0); {
    $my_line = fgets($contentfile, 16384);
    $content_array = explode("\t",$my_line);
    if ($content_array[0] == $city)
     {
$city_found = 1;
        print("Matched on $content_aray[0]<br>\n");
/* Break out of the while loop */
break;
     }
} print("$content_array[0]\n"); //end As I stated. The match happens and the "Matched on..." message happens, but the print statement outside the "while" loop does not. Its php-4.2.2 running on RedHat 8.0 (don't go there.) Its the stock redhat php package. I don't trust redhat libraries for building php from scratch. Of course, this might actually be the problem, too. :-) Curtis


« previous php.general (#171158) next »