Arrays and stdClass Objects
This is just a note about arrays and how things can go wrong if not correctly setup.
The moral of the story, is don't do the following.
$array = Array();
$array->item[0]->value = "something";
?>
Even though these objects behave similar to arrays, you cannot initialize the array or object with Array() unless you are using $array as a real array.
The following would have worked.
$array->item[0]->value = "something";
?>
By the way, when I said real array, I meant using $array in the form $array['item'][0] = "something";.
I know this may not be clear and exactly kosher in terms of correct terminology -- I did my best. If you'd like more information, please write me. The email address is at the bottom of this page.
[Click to add or edit comments])
Please prepend comments below including a date