00001 <!DOCTYPE html>
00002 <html>
00003 <head>
00004 <title>MTable - Example</title>
00005 <style type="text/css">
00006 #exp_table, .exp_cell {
00007 border: 1px solid black;
00008 }
00009 #exp_table {
00010 width: 100%;
00011 }
00012 .exp_first {
00013 font-weight: bold;
00014 }
00015
00016 .exp_row1 {
00017 background-color: #eee;
00018 }
00019 .exp_row2 {
00020 background-color: #ddd;
00021 }
00022 </style>
00023 </head>
00024 <body>
00025 <?php
00026
00027 $stimer = explode( ' ', microtime() );
00028 $stimer = $stimer[1] + $stimer[0];
00029
00030
00031 require("mtable.php");
00032
00033 $ex = new MTable;
00034
00035 $ex->default_tableprefix = "exp_";
00036
00037 $ex->default_compress = false;
00038
00039 $ex->default_start = 1;
00040
00041 $ex->addEntry("First Name", "Last Name");
00042 $ex->addEntry("Joe", "Smoe");
00043 $ex->addEntry("Jane", "Doe");
00044 $ex->addEntry("John", "Doe");
00045 $ex->addEntry("Bob", "Smith");
00046 $ex->addEntry("sthfgxjyf", "jyxfdhtfxt");
00047
00048 $ex->default_limit = 5;
00049
00050 echo $ex->displayTable();
00051
00052
00053 $etimer = explode( ' ', microtime() );
00054 $etimer = $etimer[1] + $etimer[0];
00055 echo '<p style="margin:auto; text-align:center">';
00056 printf( "Executed in <b>%f</b>ms.", (($etimer-$stimer) * 1000) );
00057 echo '</p>';
00058
00059 ?>
00060 </body>
00061 </html>