function get_details_list() {
global $pdo;
$id = (int)$_GET['id'];
$stmt = $pdo->prepare('SELECT * FROM users WHERE id = :id');
$stmt->execute(array(':id' => $id));
$details = $stmt->fetch();
return $details;
}
$stmt = $pdo->query('SELECT * FROM users');
$data = $stmt->fetchAll();
array(2) { [0]=> array(2) { ["id"]=> string(1) "1" ["login"]=> string(5) "admin" } [1]=> array(2) { ["id"]=> string(1) "2" ["login"]=> string(5) "tesyt" } }
function user() {
global $pdo;
$stmt = $pdo->prepare('SELECT * FROM use');
$details = $stmt->fetchAll();
return $details;
}