This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 12th, 2013  |  syntax: None  |  size: 0.63 KB  |  views: 29  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. $name = $_GET["name"];
  3. $email = $_GET["email"];
  4.  
  5. $list = array
  6. (
  7. '$name', '$email',
  8. );
  9.  
  10. $file = fopen("list.csv","w");
  11.  
  12. foreach ($list as $line)
  13.   {
  14.   fputcsv($file,split(',',$line));
  15.   }
  16.  
  17. fclose($file);
  18. ?>
  19.        
  20. Deprecated: Function split() is deprecated in F:xampphtdocstest.php on line 22
  21.  
  22. Deprecated: Function split() is deprecated in F:xampphtdocstest.php on line 22
  23.        
  24. fputcsv($file,split(',',$line));
  25.        
  26. $list = array
  27. (
  28. "$name", "$email",
  29. );
  30.        
  31. $list = array
  32. (
  33. $name, $email,
  34. );
  35.        
  36. foreach ($list as $line)
  37.   {
  38.   fputcsv($file,split(',',$line));
  39.   }
  40.        
  41. foreach ($list as $line)
  42.   {
  43.   fputcsv($file,explode(',',$line));
  44.   }
clone this paste RAW Paste Data