$stmt = DB::$dbh->prepare('SELECT id,title FROM map_level where id = ?');
$stmt -> execute(array($level));
$result = $stmt->fetch();
var_dump($result);
ID の定義は、データベースでは明らかに整数です。しかし、返される結果は文字列型です。
array (
'id' => '1',
0 => '1'
)
それはかなり面倒です。すべての文字列を手動でintに変換したくありません。