Jump to content


This topic is now archived and is closed to further replies.


Displaying an output

Recommended Posts

So basically this code makes a query to display the output of a mail statistic.
like this:

[img src=\"http://img.photobucket.com/albums/v679/paiperdull/fuckingoutput.jpg\" border=\"0\" alt=\"IPB Image\" /]


function mailstat($output)
    if ( $output )
            $output = array_reverse($output);
            echo "<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\">";
            foreach ($output as $line)
                echo "<tr>";
                echo "<td>$line</td>";
                echo "</tr>";
            echo "</table>";
            echo "<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\">";
            foreach ( $output as $line )
            echo var_dump($folder);
            preg_match("/Current Usage:\s(\d+)\sKB of\s(\d+)\s(.*)/",$line,$usage);
            $use = $usage[1]; $limit = $usage[2]; $percent = $usage[3];
            $pwd = $info[1]; $status = $info[2];
            $mailserver = $server;
            echo "<tr>";
            echo "<td>$use</td>"; // Usage
            echo "<td>$limit</td>"; // Usage Limit
            echo "<td>$percent</td>"; // Usage Percent
            echo "<td>$pwd</td>"; // Password
            echo "<td>$status</td>"; // Status - active/inactive
            echo "<td>$mailserver</td>";  // Mailserver
            echo "</tr>";
            echo "</table>";
            echo "No records found.</br>";

What can I do, so that the output looks more like this:

Mail Statistics

mail: user@domain.com
host: mail.lyzi.net
|| Folder || Time || Usag ||
inbox Apr-29 1.4M
draft Jan-01 25K

Total usage: 1.45M
Limit: 25M

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.