How can I separate the strings from csv file by using "," or "rn"?
Advertisement
Answer
Use explode to separate string
<?php
$csv_string = file_get_contents("file.csv");
$separated = explode("n", $csv_string);
print_r($separated);
How can I separate the strings from csv file by using "," or "rn"?
Use explode to separate string
<?php
$csv_string = file_get_contents("file.csv");
$separated = explode("n", $csv_string);
print_r($separated);