Example #1
0
$obj->createHeading('h1', 'This is a heading - h1');
$obj->createHeading('h2', 'This is a heading - h2');
$obj->createHeading('h3', 'This is a heading - h3');
echo '<hr>';
$obj->createForm($inputFields, 'index2.php');
echo '<hr>';
// Create table
echo '<h3>createTable($people) function</h3>';
createTable($people);
echo '<h3>createTable_v2($people) function</h3>';
createTable_v2($people);
echo '<h3>createTable_v2($cars) function</h3>';
createTable_v2($cars);
echo '<hr>';
$obj->setFooter("Footer - Tomasz Goralczyk");
$obj->createFooter();
// Function to create a table
function createTable($array)
{
    $firstObject = $array[0];
    $properties = $firstObject->getObjectVars();
    ?>
	<table class="table table-striped">
		<tr>
			<?php 
    foreach ($properties as $property => $value) {
        ?>
				<th><?php 
        echo $property;
        ?>
</th>