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

Read more of this post