At 09:14 AM 12/16/2001 -0500, Yoel Benitez Fonseca wrote:
>Hi!
>
>The following code fragment tries to read a sequence of digits from
>a file but it doesn't work, only the first character is read,
>Which is my error?.
>
>
> $str = "";
> while( ($c = fgetc($this->m_file)) && ereg("[0-9]", $c) ){
> $str .= $c;
> }
What happens when you do just this:
$str = "";
while($c = fgetc($this->m_file)){
$str .= $c;
}
Does it still only read the first character?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]