I got the Parse error when i try to run following PHP code. I got the error is i.e.
Parse error: syntax error, unexpected 'laptop' (T_STRING) in /home/u111963560/public_html/JSON2/DbOperation.php on line 23
<?php
class DbOperation
{
private $con;
function __construct()
{
require_once 'DbConnect.php';
$db =new DbConnect();
$this->con = $db->connect();
}
public function getLaptops(){
if($statement=$con->prepare(“SELECT * FROM laptop LIMIT 1”)){
// Execute
$statement-> execute();
// Close statement
$statement-> close();
}
// Close entire connection
$conn-> close();
}
}