You are here: fscanf question « PHP Language « IT news, forums, messages
fscanf question

Posted by Sam Waller on 01/05/07 01:52

In php5 I'm trying to read in a float number from an ascii file with:

$n = fscanf($fp, "%f", $f);

where the ascii file contains this:

"....> 1.32405 </FONT></TD>"

I use fseek to go to the offset of the single space before the number and then use fscanf. But I'm
not reading the number correctly. What is the best way to get the float into php?

thanks,
Sam

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация