Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSV reading first line, editing it and then store into database - PHP
- Name Contact ID Email Address Status
- Alice 0134222 21 alice@gmail.com 92 alice st available
- claire 013423 24 claire@gmail.com 1 young st avail
- victor 023429 31 victor@gmail.com 15/8 johnson st not available
- function parse_csvdata($filename) {
- //read the first line of the csv file only (the title)
- //rename the title to User_Name, User_Contact, User_ID (instead of Name, Contact, ID)
- //temporary store it in an array as TITLE
- //read the rest of the data (after the first line)
- //check the data in the title column. I want to change all avail to Available
- then create a new CSV out of this
- }
Add Comment
Please, Sign In to add comment