Re: Problems with fscanf [WORKAROUND] fgetc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Well, I managed to work with the spaces but using fgetc instead of fscanf.

Scanning char by char, i haven't need to worry about the spaces or new
lines.

2006/9/26, German Piqué <extremdur2@xxxxxxxxx>:

Hello.

I'm trying to parse some XML files to get all in only one file, deleting
the first and last tag when needed. But when i try to read a line like this:


<ARTIST>The Communards</ARTIST>

with the code line:

fscanf($fr,"%s")

the output is the following:

<ARTIST>The

And i want to retrieve all the line without doing something like this:

fscanf($fr,"%s/t%s")

Because I have to adapt this line to the maximum spaces existing in a line
of the file... There isn't another better solution? Thank you :)


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux