How to solve a Undefined offset when reading a csv file with PHP.?
===

Hello to all so kind persons who are always there to help us.
I need to importa a csv file to mysql using php.
the code I have until now is as follows:

Steps:
    make all the corresponding validations.
    make a mysql connection.
   

     //process the csv file
       $handle = fopen($_FILES['file']['tmp_name'], "r");
       while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
    	$att0 = mysql_real_escape_string($data[1]);
    	$att1 = mysql_real_escape_string($data[1]);
    	$att2 = mysql_real_escape_string($data[2]);
            etc, etc.
       $sql = "INSERT INTO Alumnos etc, etc.
       mysql_query($sql);

   
   Error:
   Notice: Undefined offset: 1 in D:\www\studentAdministrator\imports\importar1.php on line 58

I'll appreciate any help. thanks in advance.