エラー: 11 行目の /application/views/main_view.php の配列から文字列への変換
私のビュー main_view.php
<?php echo $someval; ?>
私のコントローラー
<?php
class Main extends Controller {
function index()
{
$example = $this->loadModel('Example_model');
$something = $example->getSomething(1);
$template = $this->loadView('main_view');
$template->set('someval', $something);
$template->render();
}
}
?>
私のモデル
<?php
class Example_model extends Model {
public function getSomething($id)
{
$id = $this->escapeString($id);
$result = $this->query('SELECT email FROM users WHERE id="1"');
return $result;
}
}
?>
なぜそれがエラーなのかわかりません。戻り値はすでに文字列になっているはずですか? 助言がありますか?ありがとう