Location: PHPKode > scripts > Simple CSV Reader > simple-csv-reader/exemplo.php
<?php
require "CsvToArray.Class.php";
 
foreach (CsvToArray::open('teste.csv') as $c)
 {
 	$nome 	   		= $c[0];
 	$empresa	   	= $c[1];
 	$cidade 	   	= $c[2];
 	$estado 	   	= $c[3];
 	$endereco	   	= $c[4];
 	$numero 	   	= $c[5];
 	$complemento	= $c[6];
 	$bairro 	   	= $c[7];
 	$cep 		   	= $c[8];
 	$pais 		   	= $c[9];
 }
?>
Return current item: Simple CSV Reader