首頁 >後端開發 >php教程 >Notice:Array to string conversion,该怎么解决

Notice:Array to string conversion,该怎么解决

WBOY
WBOY原創
2016-06-13 11:49:251143瀏覽

Notice:Array to string conversion

本帖最后由 xusheng890331 于 2014-01-06 13:13:27 编辑 网站中出现下面的错误想请教下怎么解决呢?

A PHP Error was encountered
Severity: Notice
Message: Array to string conversion
Filename: controllers/page.php
Line Number: 162

<br />function showPageV($id,$vnum)<br />	{<br />		$this->pageModel->id=$id;<br />		$this->pageModel->get_entries(); <br />        $this->smarty->assign($vnum,$this->pageModel->query->result_array());<br />        $this->smarty->assign('mainid','theDiv'.$this->p);<br />	}	



------解决方案--------------------
var_dump($vnum);
看看是什么
------解决方案--------------------
<br /><br />function showPageV($id,$vnum)<br />{<br />	$this->pageModel->id=$id;<br />	$this->pageModel->get_entries(); <br />        var_dump($vnum);<br />        print_r($this->pageModel->query->result_array());die();<br />        $this->smarty->assign($vnum,$this->pageModel->query->result_array());<br />        $this->smarty->assign('mainid','theDiv'.$this->p);<br />}	<br />
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn