Welcome Guest, Not a member yet? Register   Sign In
feeling dumb - needing help
#2

[eluser]thurting[/eluser]
It appears $usersRow is an array containing objects that have a property $name on them. Accessing the $name property of each of these objects is done successfully within the foreach loop. Attempting to access the $name of the $usersRow will fail because the array does not contain this property - it is the objects within it that do. Perhaps you should familiarize yourself with the underlying syntax of PHP.

If you expect $usersRow to return one value, you can access it through $usersRow[0] and $name using $usersRow[0]->name. You should also check out http://ellislab.com/codeigniter/user-gui...sults.html for information dealing with query results - which is what I think you are working with here.

Docs available at php.net


Messages In This Thread
feeling dumb - needing help - by El Forum - 01-24-2008, 04:13 PM
feeling dumb - needing help - by El Forum - 01-24-2008, 04:22 PM
feeling dumb - needing help - by El Forum - 01-24-2008, 04:43 PM
feeling dumb - needing help - by El Forum - 01-24-2008, 04:59 PM
feeling dumb - needing help - by El Forum - 01-24-2008, 11:41 PM



Theme © iAndrew 2016 - Forum software by © MyBB