1. **Controller**
```
public function members_area(): void
{
$this->load->model('Note_model');
$data['notes'] = $this->Note_model->show_notes('file.txt');
$this->load->view('includes/header');
$this->load->view('members_area', $data);
$this->load->view('includes/footer');
}
```
2. **Model**
```
public function show_notes(string $fileName): array
{
$notes = [];
foreach(file($fileName) as $entry) {
[$user, $content] = array_map('trim', explode(':', $entry));
$notes[] = compact(['user', 'content']);
}
return $notes;
}
```
3. **View**
```
foreach ($notes as ['user' => $user, 'content' => $content]) {
echo "
$user
";
echo "
$content
";
}
```