Hi,
i am trying to upload an excel file and to store its contents in the Mysql database.
i am having a problem in saving the contents.. like
My csv file is in the form of
"1","aruna","IEEE
paper"
"2","nisha","JOurnal magazine"
actually i am having 2 records and i am using the code
<?php
$string = file_get_contents( $_FILES["file"]["tmp_name"] );
//echo $string;
foreach ( explode( "\n", $string ) as $userString )
{
echo $userString;
}
?> since in the Csv record there is a new line inserted in between IEEE and paper it is dispaying me as 3 records..
How to remove this new line code wise and to modify the code so that only the new line between the records 1 and 2 is considered... Pls help me....