Hello
I want to create and initialize an object with the following structure :
I have tried
Initializes without problems :
But it gives an error with :
Any ideas thanks.
I want to create and initialize an object with the following structure :
$Reg->Name =" ";
$Reg->Last name1=" ";
$Reg->Last name2=" ";
for ($i=0; $i<14; $i++)
{
$Reg->$dwelling[$i]->propiety =" ";
$Reg->$dwelling[$i]->Rent = " ";
}
I have tried
$Reg = new stdClass();
Initializes without problems :
$Reg->Name =" ";
$Reg->Last name1=" ";
$Reg->Last name2=" ";
But it gives an error with :
$Reg->$dwelling[0]->propiety =" ";
$Reg->$dwelling[0]->Rent = " ";
$Reg->$dwelling[1]->propiety =" ";
$Reg->$dwelling[1]->Rent = " ";
..............
Any ideas thanks.