<?php
include 'interface.class.php';
$main = new CInterface('sample4.html');
$main->SetHeader('header4.html');
$main->SetFooter('footer4.html');
if(isset($_POST[Submit])) $main->value = htmlspecialchars(stripslashes($_POST[entrytext]));
$data = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten');
$main->data = array_chunk($data, 1);
$main->row = array(array('Monday'), array('Tuesday'), array('Wednesday'));
function row($data) {
global $main;
//WARNING: Please refer to http://bugs.php.net/bug.php?id=33513 about using the below code lines
// since in some version it will raises error
//NOTE: Use PHP Version >= 5.1.0-dev
$main->col = array();
for($i = 0; $i < count($main->data); $i++)
$main->col[$i] = array('"'.$data[0].'-'.($i+1).'"');
//for PHP5 users which using <5.1.0-dev, below to write the codes
// $xy = array();
// for($i = 0; $i < count($main->data); $i++)
// $xy[$i] = array('"'.$data[0].'-'.($i+1).'"');
// $main->col = $xy;
}
$main->Output();
?>