Re[3]: [PHP] Having problems with a while loop
| From: | Tom Rogers | Date: | Fri, 02 Jan 2004 01:13:14 +0000 |
| Subject: | Re[3]: [PHP] Having problems with a while loop | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-173616@lists.php.net to get a copy of this message | ||
Hi,
Friday, January 2, 2004, 3:56:35 AM, you wrote:
RK> Ok I changed it to look this way but it still is not working
RK> $filenum="test";
RK> $fpHt = fopen($filenum, "r");
RK> while(feof($fpHt)) {
RK> $fpLine = fgets($fpHt,512);
RK> $fpLine = trim($fpLine);
RK> $fpData = explode(":", $fpLine);
RK> $fpData[0] = trim($fpData[0]);
RK> echo $fpData[0];
RK> }
RK> And no I am just reading a .htpasswd file to get the user name out of
RK> it
should be while(!eof.....
--
regards,
Tom