Guest User

Untitled

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