Re: Formatting plain text file

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

 



<?php
//assuming you have a 2d matrix $table
$table = array(
    array("c11", "c12", "c13"),
    array("c21", "c22", "c23")
);
foreach($table as $rows) {
    $row = vsprintf(str_repeat("%-10s", count($rows)), $rows);
    echo "{$row}<br />\n";
}

wont this do ?

-- 
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