I'm trying to run this code
<?php
$mysqli = new mysqli("localhost", "root", "", "localhost");
$res = $mysqli->query("SELECT id, email FROM users WHERE id = 1");
$row = $res->fetch_assoc();
printf("id = %s (%s)\n", $row['id'], gettype($row['id']));
printf("email = %s (%s)\n", $row['email'], gettype($row['email']));
?>
But it's returning parse error
Parse error: syntax error, unexpected '$mysqli' (T_VARIABLE) in D:\xampp\htdocs\index.php on line 4
Anyone know what it could be?