Date: 09/01/01
- Next message: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Previous message: Jon Thompson Coon: "[PHP] Re: passing variables between scripts? End of story"
- Next in thread: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Reply: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hey, you people are great. 5 reasonable answers to a 1 silly problem
within the hour. I'll exploit your goodwill. Here's the next one, this
is about objects (in finnish):
class Example {
var $list; // Here I set the problem
var $hinta;
var $määrä;
function Example()
{
$hinta = 0;
$määrä = 0;
$list = array(); // Initialised
}
function addToExample($object)
{
array_push($this->list, $object); // I've been over it a hundred
times, but...
}
}
when I call the function instanceOfExample->addToExample($object) I get:
Warning: First argument to array_push() needs to be an array in xxx on
line xx
I know what this means, I also 'know' that there should not be any
mistakes in that code. Mebbe a peculiarity I don't know of?
Thanks
- jon
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Previous message: Jon Thompson Coon: "[PHP] Re: passing variables between scripts? End of story"
- Next in thread: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Reply: Martín Marqués: "Re: [PHP] Might just be a typo, but..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

