Welcome Guest, Not a member yet? Register   Sign In
Problem with data in view (SOLVED)
#3

[eluser]gazza7364[/eluser]
[quote author="CroNiX" date="1383098499"]
Code:
<div class="year" >&lt;?=$year->year?&gt;</div>

try putting a space after year and ?&gt;
[/quote]

I did as you said but stii getting same problem.

This is waht I changed it to.

Code:
&lt;? foreach ($years as $year) : ?&gt;
  <div class="year">&lt;?=$year->year ?&gt; </div>
&lt;? endforeach; ?&gt;

I have tried putting the following code in the view and it gets the values out of the array.

Code:
&lt;?php

foreach ($years as $year) {
echo $year->year;
}  
?&gt;

Not sure why it will work this way and not the other.
I still need to get the other to work for formatting the page.


I have since found out, that other parts of the site are not working since I updated to ubuntu 13.10. Looks like its a ubuntu problem and not codeigniter. Going to reinstall ubuntu to see if this solves the problem.


Messages In This Thread
Problem with data in view (SOLVED) - by El Forum - 10-29-2013, 07:58 AM
Problem with data in view (SOLVED) - by El Forum - 10-29-2013, 07:01 PM
Problem with data in view (SOLVED) - by El Forum - 10-31-2013, 01:01 AM
Problem with data in view (SOLVED) - by El Forum - 10-31-2013, 01:22 PM
Problem with data in view (SOLVED) - by El Forum - 11-01-2013, 02:57 AM
Problem with data in view (SOLVED) - by El Forum - 11-01-2013, 05:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB