943,719 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 426
  • PHP RSS
Jul 30th, 2008
0

Problem with none object property

Expand Post »
hi all;

what is wrong with in this code, please correct it

thanks

PHP Syntax (Toggle Plain Text)
  1. <?php
  2. $value="";
  3. $city="";
  4. echo $result=city::getDisplayName($value->id==$city);
  5. ?>
Last edited by Tekmaven; Jul 30th, 2008 at 9:55 am. Reason: Code tags
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
god_1896 is offline Offline
39 posts
since Jul 2008
Sep 4th, 2008
0

Re: Problem with none object property

Hi there,
you're treating $value as if it were an object while it is in fact a string "".
You cannot write $value->id unless you first assign an instance of an object to $value.
Reputation Points: 27
Solved Threads: 16
Junior Poster
petr.pavel is offline Offline
116 posts
since Mar 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Problem in calling store procedure in php
Next Thread in PHP Forum Timeline: Drag and drop files and folders





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC