<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: 2 Codeigniter Controller Querys on One View</title>
	<atom:link href="http://www.phpframeworks.com/news/p/1267/2-codeigniter-controller-querys-on-one-view/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phpframeworks.com/news/p/1267/2-codeigniter-controller-querys-on-one-view</link>
	<description>We compare all kinds of PHP frameworks and help you choose the right php framework for your project.</description>
	<lastBuildDate>Tue, 13 Dec 2011 05:16:59 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jason</title>
		<link>http://www.phpframeworks.com/news/p/1267/2-codeigniter-controller-querys-on-one-view/comment-page-1#comment-314</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Wed, 25 Nov 2009 20:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://stackoverflow.com/questions/1719150/2-codeigniter-controller-querys-on-one-view#comment-314</guid>
		<description>$data(&#039;result&#039;) is not an array. When you call $this-&gt;load-&gt;view(&#039;view_file_name&#039;, $data_array) $data_array should contain your associative array.

From your example it appears you forgot to pass the second parameter to the view method ($this-&gt;load-&gt;view).</description>
		<content:encoded><![CDATA[<p>$data(&#8217;result&#8217;) is not an array. When you call $this-&gt;load-&gt;view(&#8217;view_file_name&#8217;, $data_array) $data_array should contain your associative array.</p>
<p>From your example it appears you forgot to pass the second parameter to the view method ($this-&gt;load-&gt;view).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: michaeljdennis</title>
		<link>http://www.phpframeworks.com/news/p/1267/2-codeigniter-controller-querys-on-one-view/comment-page-1#comment-160</link>
		<dc:creator>michaeljdennis</dc:creator>
		<pubDate>Thu, 12 Nov 2009 07:58:15 +0000</pubDate>
		<guid isPermaLink="false">http://stackoverflow.com/questions/1719150/2-codeigniter-controller-querys-on-one-view#comment-160</guid>
		<description>Here&#039;s a simple example that might help:

CONTROLLER:

function index()
{
    $data[&#039;to_dos&#039;] = $this-&gt;db-&gt;get(&#039;to_dos&#039;);
    $data[&#039;completed_to_dos&#039;] = $this-&gt;db-&gt;get(&#039;completed_to_dos&#039;);
    $this-&gt;load-&gt;view(&#039;to_do_view&#039;);
}

VIEW:


    openphptag

    foreach($to_dos as $to_do)
    {
        echo $to_do,&#039;&#039;;
    }

    closephptag



    openphptag

    foreach($completed_to_dos as $completed_to_do)
    {
        echo $completed_to_do,&#039;&#039;;
    }

    closephptag
</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a simple example that might help:</p>
<p>CONTROLLER:</p>
<p>function index()<br />
{<br />
    $data['to_dos'] = $this-&gt;db-&gt;get(&#8217;to_dos&#8217;);<br />
    $data['completed_to_dos'] = $this-&gt;db-&gt;get(&#8217;completed_to_dos&#8217;);<br />
    $this-&gt;load-&gt;view(&#8217;to_do_view&#8217;);<br />
}</p>
<p>VIEW:</p>
<p>    openphptag</p>
<p>    foreach($to_dos as $to_do)<br />
    {<br />
        echo $to_do,&#8221;;<br />
    }</p>
<p>    closephptag</p>
<p>    openphptag</p>
<p>    foreach($completed_to_dos as $completed_to_do)<br />
    {<br />
        echo $completed_to_do,&#8221;;<br />
    }</p>
<p>    closephptag</p>
]]></content:encoded>
	</item>
</channel>
</rss>

