The PHP code looks like this:
$con = new PDO(SERVIDOR, USUARIO, SENHA);
$sql = $con->prepare("SELECT COUNT(id) FROM quiz;");
$sql->execute();
$n = $sql->fetchObject();
And the HTML code looks like this:
<h1>0<?= print $n->COUNT(id);?></h1>
and the error that appears: Fatal error: Call to undefined method PDOStatement :: COUNT () in ............
Could someone show me the error?