This is my function:
public function showDataall($result)
{
$q = $this->conn->prepare($result) or die("failed!");
$q->execute();
while ($r = $q->fetch(PDO::FETCH_ASSOC))
{
$data[] = $r;
}
return $data;
}
This function perfectly work in old xampp but new xampp return a Notice:
Undefined variable: data in /opt/lampp/htdocs/live/demo/model/config.php on line 152