Advertisement
shutdown57

pemisah jarak di antara kita

Dec 13th, 2017
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2. // coded by shutdown57
  3. echo "\n=[ TOOLS KONTOOLS ]=\n";
  4. echo "masukin file      ::"; $file = trim(fgets(STDIN));
  5. echo "delimiter/pemisah ::"; $delim =trim(fgets(STDIN));
  6. echo "simpan dengan nama::"; $nama =trim(fgets(STDIN));
  7. $pisah=explode(PHP_EOL,file_get_contents($file));
  8. foreach($pisah as $pepek){
  9.  
  10. $mail=explode($delim,$pepek);
  11. @$email.=$mail[0]."\n";
  12. }
  13. $fp = fopen($nama,'w');
  14. fwrite($fp,$email);
  15. fclose($fp);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement