trim lines

This commit is contained in:
Mattia Basaglia 2013-11-06 16:43:48 +01:00
parent 5d5d17a534
commit 9d5f0ce10b

View file

@ -11,8 +11,9 @@ foreach($dir_files as $file)
{
$curr_file = file("$dir/$file",FILE_IGNORE_NEW_LINES);
$files[$file] = $curr_file;
foreach($curr_file as $line)
foreach($curr_file as &$line)
{
$line = rtrim($line);
$w = strlen($line);
if ( $w> $maxw )
$maxw = $w;