Can you change the query that's pulling the recordset to get just the row needed?
$query = "SELECT `name`, `code`, `age`, `address` FROM `table` WHERE `code` = '". $searchCode ."';";
Otherwise, you might have to loop through the entire recordset and dig out the one you need:
foreach ($recordSet as $key => $record) {
if ($record["code"] == $searchCode) {
// do something with $recordSet[$key]
}
}