Problem with Tabs and Newlines

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux