|
Posted by "Richard Lynch" on 11/22/05 23:35
On Tue, November 22, 2005 2:37 pm, Eric wrote:
> $this->title=$this->B[$key]->title;
While this is SUPPOSED to work in PHP 5, it would be my first suspect
of under-tested code.
Try this:
$temp = $this->B[$key];
$this->title = $temp->title;
> This is not a typo, the key mysterialy changed to "Nederlancs"! The
> "d"
> became a "c".
This sounds like you treated a STRING as if it were an ARRAY.
Keep in mind that PHP is quite happy to treat STRING variables is if
they were arrays of characters.
So it's entirely possible that your code is NOT altering array
elements but is altering string characters.
It sounds like you are storing an object property sometimes as a
string, and sometimes as an array.
Don't.
Or, if you must, then you had better type-check the data every time
you use it for anything.
--
Like Music?
http://l-i-e.com/artists.htm
[Back to original message]
|