I'm working through pset 7, Every time I render and generate html in the controller it appears above the header on the generated page, I can't for the life of me get it to stop.
here's to code.
<?php
/Controller/
// configuration
require("../includes/config.php");
$rows = query("SELECT symbol, shares FROM shares WHERE id = ?", $_SESSION["id"]);
// render portfolio
foreach ($rows as $row)
{
print("<center><tr>");
print("<td><p> Type of stock owned:</p>{$row["symbol"]}<br /><br /></td>");
print("<td><p> Amount of this stock owned:</p>{$row["shares"]}</td>");
print("</tr></center>");
}
render("portfolio.php", ["title" => "Portfolio"]);
?>
Thanks