Welcome Guest, Not a member yet? Register   Sign In
when i fetch array i get that??
#1

[eluser]Unknown[/eluser]
Code:
Array
(
    [0] => stdClass Object
        (
            [id] => 4
            [programs] => FireFox
            [version] => 4.00
            [type] => Browsers
            [description] => fdmkfdsf,sdfdsfdsfdsf
dfdsf
sd
f
dsf
ds
f
            [views] => 2
            [serial] => 434343-343434-3434-c
        )

)
i put it through foreach() function to get it's contents but i get fatal-error

Code:
#
A PHP Error was encountered

Severity: 4096

Message: [color=blue]Object of class stdClass could not be converted to string[/color]

Filename: views/results.php

Line Number: 2

thanks
#2

[eluser]John_Betong_002[/eluser]
Please supply your foreach() script.
 
 
 
#3

[eluser]mihaibaboi[/eluser]
From what can I see, I'm guessing that you skiped a step. You loop through the array, but you don't treat each item as an object. Remember that in the foreach, your item is a stdClass object, and you should treat it as such.

But that's just a wild guess. Please provide the foreach code so we can better understand the problem.




Theme © iAndrew 2016 - Forum software by © MyBB