break; } else { $out .= "<tr>"; $out .= "<td>{$m}</td><td>{$n}</td>"; $out .= "</tr>"; } } return $out; } function main() { $table = ""; $see = new view(); if (isset($_POST['submit'])) { unset($_POST['submit']); if (empty($_POST['info'])) { echo $see->htmlTag("p", "It's empty!", "class='error-msg'"); } else { $data = json_decode($_POST['info'], true); if (is_array($data)) { $table = $this->isAnArray($data); } } } //end if $see->render($table); } } $launch = new controller(); $launch->main();