| | |
Problem with none object property
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2008
Posts: 39
Reputation:
Solved Threads: 0
hi all;
what is wrong with in this code, please correct it
thanks
what is wrong with in this code, please correct it
thanks
PHP Syntax (Toggle Plain Text)
<?php $value=""; $city=""; echo $result=city::getDisplayName($value->id==$city); ?>
Last edited by Tekmaven; Jul 30th, 2008 at 9:55 am. Reason: Code tags
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.
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.
Petr 'PePa' Pavel
The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
The more information you give the more relevant answer you get.
Please consider using "Add to ... Reputation" and mark your thread as Solved if you found what you were looking for. By giving feedback you help others.
![]() |
Similar Threads
- Binary File IO (C#)
- Popups and problem loading desktop (Viruses, Spyware and other Nasties)
- Python GUI Problem (Python)
- Excel Form - For/Next - Naming Convention Problem (Visual Basic 4 / 5 / 6)
- Need help with stubborn spyware problem (Viruses, Spyware and other Nasties)
- Please Help with my guard.tmp problem (Viruses, Spyware and other Nasties)
- Problem deserializing objects from multiple classes (C#)
- problem with Sendkeys (Visual Basic 4 / 5 / 6)
- Yet another AURORA problem (Viruses, Spyware and other Nasties)
- problem with connection to sql server (ASP.NET)
Other Threads in the PHP Forum
- Previous Thread: Problem in calling store procedure in php
- Next Thread: Drag and drop files and folders
| Thread Tools | Search this Thread |
# .htaccess 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clients cms code cron curl database date directory display dissertation download dynamic echo email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link login loop mail memberships menu mlm mod_rewrite multiple mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space sql syntax system table tutorial update upload url validation validator variable video web xml youtube





