Welcome Guest, Not a member yet? Register   Sign In
Simple foreach loop not working (code)
#3

[eluser]David Mitchell[/eluser]
Thanks aquary but now it says an error for each of the echo statements:
Code:
A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: index.php
Line Number: 7

A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: index.php
Line Number: 8

A PHP Error was encountered
Severity: Notice
Message: Trying to get property of non-object
Filename: index.php
Line Number: 9

Code:
object(CI_DB_mysql_result)#15 (8) { ["conn_id"]=> resource(30) of type (mysql link persistent) ["result_id"]=> resource(38) of type (mysql result) ["result_array"]=> array(0) { } ["result_object"]=> array(0) { } ["custom_result_object"]=> array(0) { } ["current_row"]=> int(0) ["num_rows"]=> int(3) ["row_data"]=> NULL }

I dont understand.

You say that this isnt how you would code it, is there a more efficant way?

David


Messages In This Thread
Simple foreach loop not working (code) - by El Forum - 02-17-2012, 07:53 AM
Simple foreach loop not working (code) - by El Forum - 02-17-2012, 07:59 AM
Simple foreach loop not working (code) - by El Forum - 02-17-2012, 08:46 AM
Simple foreach loop not working (code) - by El Forum - 02-17-2012, 09:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB