意外的T_string错误 - 在哪里? [关闭]

This piece of code gives me a syntax error, but I can't figure out why.

Parse error: syntax error, unexpected T_STRING in C:\Users\user\school\infPOPHP2\USBWebserver v8.5\8.5oot\create_db.php on line 7

line 7 is

$db = new PDO("mysql:host=$hostname;dbname=$dbname",$username,$password);

This is the full code

<?php
$hostname = "localhost";
$username = "root";
$password = "usbw";
$dbname = "competitie";
try {
    $db = new PDO("mysql:host=$hostname;dbname=$dbname",$username,$password);
    $sql = "CREATE DATABASE IF NOT EXISTS competitie" ;
    $resultaat = $db­>exec($sql);
    $db = NULL;
}
catch(PDOException $e) {
    echo $e­>getMessage();
}
?>

Check all the ;'s in the code and replace them with conventional ;s (ASCII 59).
Don't use fancy editors like Microsoft Word to edit code.