Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $cabezal = array("Telefono","DTO","siglas","Nombre"/*más nombres de columnas (hasta 55)*/);
- if ($_FILES['csv']['size'] > 0) {
- $csv = $_FILES['csv']['tmp_name'];
- $handle = fopen($csv,'r');
- $i = 0;
- while ($data = fgetcsv($handle,0,",","'")){
- if ($data[0]) {
- funcion_importar($cabezal[$i]/*nombre de columna*/,data[$i]/*valor*/)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement