PHP - 错误=> T_CONSTANT_ENCAPSED_STRING

PHP - Error=> T_CONSTANT_ENCAPSED_STRING

我正在生成 JSON 提要并出现 语法错误,意外的“'Venue'”(T_CONSTANT_ENCAPSED_STRING),预期在第 25 行出现“)”[=16] =] 所有名称广告字段在数据库中都是正确的。我使用的代码在这里

<?php
$servername = "******";
$username = "******";
$password = "******";
$dbname = "******";


// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "select id ,Title , Description , Venue , Date from lodhievent";
$result = $conn->query($sql);
$values = array();
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {

    $values['data'][] = array(
        'id'=>$row['id'],
        'Title'=>$row['Title'],
        'Description'=>$row['Description']
        'Venue'=>$row['Venue']
        'Date'=>$row['Date']
    );

}


header('Content-Type: application/json;charset=utf-8');
echo json_encode($values ,JSON_PRETTY_PRINT);

} else {
$values = array(
    'error'=>'No results found'
);

}
$conn->close();
?>

你忘记了前两行的逗号:

'Description'=>$row['Description'],
'Venue'=>$row['Venue'],
'Date'=>$row['Date']