Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $myfile = "/home/dibon/AML_Data/test.csv";
- $myfile = fopen("$myfile", "r") or die("Unable to open file!");
- fgets($myfile); //First fgets to read over header line.
- while($line=fgets($myfile)){
- //Explode your line by space delimeter
- $words=explode("|",$line);
- DB::table('transaction_incremental')->insert(
- ['ReceiptNumber' => "$words[0]", 'InitiatingMSISDN' => "$words[2]"]
- );
- }
Add Comment
Please, Sign In to add comment