Welcome Guest, Not a member yet? Register   Sign In
Get the generated value of a loop
#4

[eluser]jprateragg[/eluser]
I think your problem is here:

Code:
for($i>1; $i<=$datos['idacta']; $i++)

You're essentially saying: For i greater than 1, and i less than or equal to the value in datos['idacta'], and increment by adding i+1.

To use the for() function, you need to know the count() of array items in $datos. But as solid9 said, you're violating the MVC framework. For example, in your query, there's no need to store the result as an object then restore it as an array. $query->result_array() will already do this. I think you need to read the user guide sections focusing on views and getting data from a database query.


Messages In This Thread
Get the generated value of a loop - by El Forum - 11-11-2012, 10:29 PM
Get the generated value of a loop - by El Forum - 11-11-2012, 11:35 PM
Get the generated value of a loop - by El Forum - 11-12-2012, 09:30 AM
Get the generated value of a loop - by El Forum - 11-12-2012, 10:44 AM
Get the generated value of a loop - by El Forum - 11-15-2012, 06:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB