Home > php教程 > php手册 > body text

php读取csc文件并输出

WBOY
Release: 2016-06-06 20:03:57
Original
1248 people have browsed it

本文给大家分享的是php读取csc文件并输出的方法,方法一用到的是fgetcsv函数,方法二用到是fopen函数,有需要的小伙伴可以参考下。

方法一:

方法二:

$fh = fopen("contacts.csv", "r"); while($line = fgetcsv($fh, 1000, ",")) { echo "Contact: {$line[1]}"; }

以上所述就是本文的全部内容了,,希望大家能够喜欢。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!