cara menyimpan variabel dari kueri di mysql dengan php

$result = $db->query('Select `Name`, `Age`, `Color` from `People` ');
while ($rows = $result->fetch()){
$Name = $rows['Name'];
$Age = $rows['Age'];
$Color = $rows['Color'];
}
Annoyed Ape