On Mon, May 21, 2001 at 05:58:06PM -0400, Bob wrote :
> I have a class defined with a var $reasons that I will use as an array. The
> code to add to it is:
>
> function AddReason($score, $reason, $id)
> {
> static $index = 0;
> $this->reasons[$index] = "$score|$reason|$id";
> for ($i = 0; $i < $index; $i++)
> {
> $out = $this->reasons[$i];
> echo "$out...";
> }
> $index++;
> return $score;
> }
Put in a
var_dump( $this->reasons);
to view yourself what it really contains.
Or maybe you called your method static instead of a method ?
- Markus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]