Welcome Guest, Not a member yet? Register   Sign In
foreach in view, what am I doing wrong
#4

[eluser]artallan[/eluser]
Code:
<?php foreach($news as $row => $val): ?>
    <li>This is the title : &lt;? echo $val->title; ?&gt;</li>
    <li>This is the title : &lt;? echo $row->title; ?&gt;</li>
&lt;?php endforeach; ?&gt;

use proper php tag,
Code:
&lt;?php echo $val->title; ?&gt;
or if you want the shortcode use
Code:
&lt;?=$val->title?&gt;


Messages In This Thread
foreach in view, what am I doing wrong - by El Forum - 01-30-2011, 11:24 AM
foreach in view, what am I doing wrong - by El Forum - 01-30-2011, 11:41 AM
foreach in view, what am I doing wrong - by El Forum - 01-30-2011, 12:59 PM
foreach in view, what am I doing wrong - by El Forum - 01-30-2011, 08:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB