【发布时间】:2014-10-06 15:36:37
【问题描述】:
我对 PDO 很陌生,我正在尝试解码表“test”中包含特殊实体的所有行,例如“('L& eacute;on: The Professional')”而不是“Léon:The Professional ”。
所以,这是我尝试过的:
<?php
require_once('connection.php');
$stmt = $conn->prepare("SELECT * from test");
$stmt->execute();
while ($results = $stmt->fetch()){
$b = html_entity_decode($stmt);
echo $b;
}
但我没有打印输出..
有人可以帮我解决吗?
【问题讨论】:
-
如您所见,
$query尚未定义。所以它没有“执行”功能。也许您应该尝试在$conn或$stmt上调用它。
标签: php pdo decode html-entities