Reply to Re: Line count/blank line issue with file(), etc.

Your name:

Reply:


Posted by Sean on 12/27/05 18:01

If you have a text file.

//numbers.txt
1
2
3

5
6
7

The resulting array (i.e. print_r(file('numbers.txt')); (

is

Array
(
[0] => 1

[1] => 2

[2] => 3

[3] =>

[4] => 5

[5] => 6

[6] => 7
)

which is what I would expect. Nothing so extraordinary about that.

New line or carriage return or whatever is still just a character (or
two characters if you use windows), and the manual spells out quite
clearly what happens.

"Note: Each line in the resulting array will include the line
ending, so you still need to use rtrim() if you do not want the line
ending present."

http://ie.php.net/file

[Back to original 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

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