foreach ($answer_DocPrice as $key => $value){
$id = $answer_DocPrice[$key]['id']."<br>";
$all_info__DocPriceBody = "SELECT * FROM DocPriceBody WHERE doc_id = '$id' ";
$request_to_DocPriceBody = $db->query($all_info__DocPriceBody);
$answer_DocPriceBody = $request_to_DocPriceBody->fetch(PDO::FETCH_ASSOC);
$array[$keys]['doc_id'] = $answer_DocPriceBody['doc_id'];
$array[$keys]['date'] = $date;
$product_id = $answer_DocPriceBody['product_id'];
$array[$keys]['price'] = $answer_DocPriceBody['price'];
$all_info_Product = "SELECT * FROM Product WHERE id = '$product_id' ";
$request_to_Product = $db->query( $all_info_Product);
$answer_Product = $request_to_Product->fetch(PDO::FETCH_ASSOC);
$array[$keys]['title'] = $answer_Product['title'];
$array[$keys]['description'] = $answer_Product['description'];
$keys++;
}
А тебе обязательно в пхп делать запрос?
Ilya
Александр
Bat
Igor
Ilya
Alex