473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Object of class stdClass could not be converted

190 100+
Hi guys,

I have below values in array
Expand|Select|Wrap|Line Numbers
  1. stdClass Object ( [Category] => stdClass Object ( [ChildCategoryDescription] => 50s / 60s ERA [ChildCategoryID] => 87 [GrandchildCategoryDescription] => - [GrandchildCategoryID] => 25 [ParentCategoryDescription] => CONCERTS [ParentCategoryID] => 2 ) [Description] => Tony Bennett [ID] => 1073 [HomeVenueID] => 0 )
  2.  
When am calling Desciption object by $resultsObj->Description then i got the result " Tony Bennett" but i do not know to get the value GrandchildCategoryID . Just i tried this
Expand|Select|Wrap|Line Numbers
  1. echo $resultsObj->$resultsObj->ParentCategoryID and i got below error.
  2.  
Catchable fatal error: Object of class stdClass could not be converted to string in D:\Program Files\xampp\htdocs\t1\genericLib.php on line 255.

How i can get this value...
Apr 14 '11 #1

✓ answered by Dormilich

try echo $resultsObj->Category->ParentCategoryID

2 2581
Dormilich
8,658 Expert Mod 8TB
try echo $resultsObj->Category->ParentCategoryID
Apr 14 '11 #2
maheswaran
190 100+
god thank you Dorm. I just tried with $resultsObj->resultsObj->ParentCategoryID and failed. I totally forgot to use Category.
Apr 15 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: SteveS | last post by:
This has been bothering me for a long time, and I'm curious about everyone's opinion or a "Microsoft Best Practices" method of doing this. I have a "Member" business object which contains...
1
by: oj | last post by:
Could someone explain to me why the following code snippet throws an "Object Reference not set to an instance of an object error": public void SetActiveStaffMember(int staffMemberId) { ...
5
by: Ram | last post by:
Hi Friends I want to develope a custom control in .net which can be used with any project. I am writing a function in that class which I want to take any object as parameter. For that I have...
2
by: Bryan Dickerson | last post by:
I recently converted a VB6 program to VS 2005 that had a call to some Shell32 APIs to manipulate/test some registry keys. Using My.Computer.Registry, I was able to make the program much simpler. ...
2
by: Aryan | last post by:
Hi, I am implementing Business object, but while implementing this I want to have DataTable or DataSet as part of Business Object. For example, I want to bind controls directly to these Business...
3
by: mak2045 | last post by:
I copied a form (Microsoft 2000 with Visual Basic 6.0) that had a procedure behind the text box and renamed it. I did not get an error message, but the new form that I thought I created did not...
5
by: mikie | last post by:
somebody asked me a question: string is derived from object class, right? (i said yes) so how it could be object class declares method returning string? thanks for any explanation / link /...
4
by: pjerald | last post by:
Clear me friends. Object class is the base class for all classes. Thus the methods with protected access in the object class can be invoked by any object(Of any class). I know the statement is...
2
by: Jean Marie | last post by:
Hi, i have a problem with the usage of stdClass. From a SOAP based web service i get a code list as an array of stdClass instances: array ( 0 => stdClass::__set_state(array(
9
ebcovert3
by: ebcovert3 | last post by:
Ok, I really need help. I am running EE (an older version admittedly) but this just started happening. I noticed a lot of spam accounts being requesting authorization to my website. I went in to the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.