| | |
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 ajax apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail match menu mlm mod_rewrite multiple mysql oop paypal pdf php problem protocol query radio random recursion regex remote script search server sessions sms smtp soap source space sql strip_tags survey syntax system table tutorial undefined update upload url validation validator variable video virus votedown web window.onbeforeunload=closeme; xml youtube





