Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- fscanf not parsing all values


rlange - 2:56 pm on Jul 24, 2012 (gmt 0)


dfeddel wrote:
fscanf($menu_handle,'%s\t%s\n')


Try changing
'%s\t%s\n' to "%s\t%s\n" (single quotes to double quotes).

A single-quoted string [php.net] in PHP is a literal string. That means, in your current code,
fscanf() is looking for, literally, a "\" followed by a "t" instead if the tab character.

--
Ryan


Thread source:: http://www.webmasterworld.com/php/4476948.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com