You are here: Problem with Tabs and Newlines « PHP « IT news, forums, messages
Problem with Tabs and Newlines

Posted by Phusion on 03/07/05 16:55

I'm having problems with a function I created to display filesystems.
The problem is that I can't get tabs (\t) or newlines (\n) to work.

function filesystems () {
$df = `df -kP`;
$mounts = preg_split('/\n/', $df);
$row = "Filesystem\t" . "Size\n";
for ($i = 1, $max = sizeof($mounts); $i < $max; $i++) {
$row .= $mounts[$i];
$row .= "\n";
}
$result = $row;
echo $result;
}

....

<table border="1" cellspacing="0" cellpadding="0" width="600" align="center">
<tr>
<td width="600"><? filesystems(); ?></td>
</tr>
</table>

I just put filesystem and size on the first line to test the \t for
creating a tab. The \t and \n don't seem to work. What am I doing
wrong here? Thanks for any help you can give me.

 

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

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