By the way I have one problem in PHP 5.x
I have one php file like this
flats.php
class Flat
{
public block;
public number;
}
and 2nd class as flatowners.php
class flatowners
{
public name; //type string
public flat; //type Flat
function getFlatOwner($block,$number)
{
//get $name from database;
$flat = new Flat();
$flat->block = $block;
$flat->number = $number;
}
}
I want to do something like this...it dosent work.
Basically I am not able to have a custom object type as datamember of another class.
I also tried
Flat flat; instead of public flat;
Is there any solution?
Thanks and Regards,
Mohit