السلام عليكم جميع الاخوة
سؤال لم اجد له مخرج حتى الان :
private $dataQuery = array();
protected $tableau1 = array();
public $title = array();
public $author = array();
public $tableau2 = array();
function __construct()
{
mysql_connect("localhost" , "root", "");
mysql_select_db("agency");
$this->dataQuery = mysql_query('SELECT * FROM books ');
}
public function affichage()
{
while($row = mysql_fetch_assoc($this->dataQuery))
{
$tableau1['title'] = $row['title'];
$tableau1['author'] = $row['author'];
$tableau2[] = $tableau1;
}
}
}//fin class affich_books
$affichBooks = new affich_books();
$affichBooks->affichage();
$Data = $affichBooks->tableau2;
[/left
في النهاية اريد ان يحوي النتغير $data على جميع الكتب