Ok now its weird but when i print the array in the test1 function its prints all the arrays but when it display it from the test2 function its displays only the last records can anyone tell me where i am wrong?
class template{
private $block = array();
private $page;
public function test1($data){
foreach($data as $k => $v){
$this->block[$k] = $v;
}
print_r ($this->block);
}
public function test2(){
print_r ($this->block);
}
}
$template = new template();
while($row1 = mysql_fetch_assoc($bbcat)){
$template->test1(array("TIT" => $row1['title']));
while($row2 = mysql_fetch_assoc($bbscat)){
$template->test1(array("FTIT" => $row2['title']));
}
}
test2()
anywhere...