Witam mam następujący problem, jak wypisać na stronie wszystkie pobrane rekordy ze zmiennej $temat?
class wpis{
private $temat = array();
public function pobierzTemat (){
return $this->temat ;
}
public function pobierzWpis($id_user,$opublikowane){//opublikowane 0-nie, 1-tak;
$query = " SELECT tematFROM wpisy WHERE `id_user`='$id_user' and `opublikowane` = '$opublikowane' ";
$result = mysql_query($query);
if (!$result){
die ("Dane nie zostały pobrane". mysqli_error());
}
else
{
while ($rek = mysql_fetch_array($result)){
$this->temat=$rek['temat'];
}
}
}
}