I need to ignore the first line of a file I'm importing into csv with php, that first line is a header, any hint how can I do this? I tried to make an accountant, but I could not solve it, what I have is this:
if (!empty($_FILES)) { $tempFile = $_FILES['userImage']['tmp_name']; $Dados = file($tempFile); foreach($Dados as $RegLinhas) { // RETIRA ESPAÇOS NO INÍCIO E FIM $Linha = trim($RegLinhas); // DIVIDE A STRING $CamposImport = explode(';', $Linha); $IdPessoa = $CamposImport[0]; $Nome = $CamposImport[1]; $IdUnicoop = $CamposImport[2]; $DataAdmissao = $CamposImport[3]; $IdCargo = $CamposImport[4]; $LotacaoRH = $CamposImport[5]; $CTPS = $CamposImport[6]; $CTPSSerie = $CamposImport[7]; $CTPSUF = $CamposImport[8]; $DataNascimento = $CamposImport[9]; $CPF = $CamposImport[11]; } }