$stmt = $this->runQuery("SELECT count(id) FROM orders WHERE user_id =:user_id ");
$stmt->bindValue(":user_id", $_SESSION['user_session'], PDO::PARAM_STR);
$stmt->execute();
$countOrders = $stmt->fetchAll(PDO::FETCH_ASSOC);
return $countOrders;
foreach ($Cart->countOrders() as $orders) {
echo $orders[count(uid)] ;
}
Если взять пример www.cs.indiana.edu/classes/a202-dger/spr2006/notes...