使用php脚本从CSV中删除列 [英] Remove columns from CSV using a php script

查看:75
本文介绍了使用php脚本从CSV中删除列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。不确定这是否是正确的问题,但我是php的新手,我正在构建一个脚本来删除逗号分隔文件中的某些列以及其他内容。我的问题是使用PHP脚本删除列。我不确定我是否应该使用$ temp或什么。有人可以帮帮我吗。谢谢,很高兴成为会员。


JSchofield

Hello all. Not sure if this is the correct place to ask this but I am new to php and I am building a script to remove certain columns in a comma delimited file plus other things. My problem is removing the columns using a php script. Im not sure if I should use $temp or what. Could anyone please help me out. Thanks and glad to be a member.

JSchofield

推荐答案

temp或what。有人可以帮帮我吗。非常感谢并很高兴成为会员。


JSchofield
temp or what. Could anyone please help me out. Thanks and glad to be a member.

JSchofield


欢迎来到我们的社区!


以下PHP文档片段(参见 fgetcsv )可以帮到你。它读取CSV文件并回显每行的数据字段。您可以轻松修改它以从数据构建新文件。 Holler,如果它没有成功。[php]<?php
Welcome to our community!

The following snippet from the PHP documentation (see fgetcsv) could help you. It reads a CSV file and echoes the data fields from each row. You can easily modify that to build a new file from the data. Holler if it doens''t work out.[php]<?php


row = 1;
row = 1;


这篇关于使用php脚本从CSV中删除列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆