我想知道为什么我的PHP
/PDO
编码在第 9 行和第 16 行收到语法错误。我的代码如下:
<?php
// Sandbox Functions
// PDO example
function get_page($dbc, $pg) {
$sql = "SELECT * FROM pages WHERE page = '$pg' AND status = 1 LIMIT 1";
$stmt = $dbc->prepare($sql);
$stmt->execute();
$row = $stmt->fetch()
echo '<h1>'.$page['title'].'</h1>';
echo '<div class="content">'.$page['body'].'</div>';}
function get_title($dbc, $pg) {
$sql = "SELECT title FROM pages WHERE page = '$pg' AND status = 1 LIMIT 1";
$stmt = $dbc->prepare($sql);
$stmt->execute();
$row = $stmt->fetch()
return $page['title'];}
?>