Posted by Oli Filth on 11/24/63 11:29
mungflesh wrote:
> I am new to PHP. Can I define an array in PHP 4.3 containing class
> types?
>
> ie. (simplified example)
>
> class MyType
> {
> function MyFunc()
> {
> $newType = new MyType;
> this->$array_MyType[] = $newType;
> }
> }
>
> I am getting an error "Cannot use [] for reading"
>
I would check the syntax for "this", if I were you...
--
Oli
Navigation:
[Reply to this message]
|