|
SplFileObject::fgetcsvGets line from file and parse as CSV fields Beschreibung
public array SplFileObject::fgetcsv
([ string
$delimiter = ","
[, string $enclosure = "\""
[, string $escape = "\\"
]]] )Gets a line from the file which is in CSV format and returns an array containing the fields read. Parameter-Liste
Rückgabewerte
Returns an indexed array containing the fields read, or
Beispiele
Beispiel #1 SplFileObject::fgetcsv example
<?php
Beispiel #2
<?phpContents of animals.csv crocodile,reptile,4 dolphin,mammal,0 duck,bird,2 koala,mammal,4 salmon,fish,0 Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: A crocodile is a reptile with 4 legs A dolphin is a mammal with 0 legs A duck is a bird with 2 legs A koala is a mammal with 4 legs A salmon is a fish with 0 legs Siehe auch
|