I have problem :(
[19-Feb-2016 22:46:28 Europe/Berlin] PHP Notice: Undefined offset: 3 in D:\Xampp\htdocs\Fix\index.php on line 30
[19-Feb-2016 22:46:28 Europe/Berlin] PHP Notice: Undefined index: in D:\Xampp\htdocs\Fix\index.php on line 30
[20-Feb-2016 00:39:13 Europe/Berlin] PHP Notice: Undefined offset: 1 in D:\Xampp\htdocs\Fix\index.php on line 28
[20-Feb-2016 00:39:13 Europe/Berlin] PHP Notice: Undefined offset: 2 in D:\Xampp\htdocs\Fix\index.php on line 29
[20-Feb-2016 00:39:13 Europe/Berlin] PHP Notice: Undefined offset: 3 in D:\Xampp\htdocs\Fix\index.php on line 30
[20-Feb-2016 00:39:13 Europe/Berlin] PHP Notice: Undefined index: in D:\Xampp\htdocs\Fix\index.php on line 30
<?php
$pageTitle='Списък';
include 'header.php';
$groups=array(1=>'Храна',2=>'Транспорт',3=>'Дрехи',4=>'Други' );
?> <a href="form.php">Добави разход</a> <table style="border: 1px solid red;"> <tr> <td>Дата</td> <td>Име</td> <td>Сума</td> <td>Вид</td> </tr> <?php
if (file_exists('data.txt')) {
$result= file('data.txt');
foreach ($result as $value) {
$columns=explode('!', $value);
echo '<tr> <td>'.$columns[0].'</td> ----> line 27
<td>'.$columns[1].'</td> ----> line 28
<td>'.$columns[2].'</td> ----> line 29
<td>'.$groups[trim($columns[3])].'</td> ----> line 30
</tr>';
}
}
?> </table> <?php
include 'footer.php';
?>
Help me find my mistake beginner 'm in PHP.