<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> input[type=text]{ width:60px; } table,tr,td,th{ border: 2px solid #000; } table{ width: 300px; border: 1px solid #000; } </style> </head> <body> <h1>Folha de Notas</h1> <hr> <form action="" method="post"> <? $objTabela = new Matriz(10,3); ?> </form> </body> </html> <?php if (filter_input(INPUT_POST, 'calcular')) { $objTabela->calculaMedia(); }