M
Can anyone tell me how to transfer and pick data from an excel sheet and put that in the table of a database in SQL?
Amitabh Bachhan, 62, Male
Emma Watson, 18, Female
Daniel Radcliffe,18,Male
<?php
$xls=file("xls2mysql.csv");
foreach($xls as $row)
{
$fields=explode(",",$row);//comma if csv; /t(tab) if tab demilted.
echo "$fields[0] ";//instead of echoing the fileds, you should prepare the mysql insert query
echo "$fields[1] ";
echo "$fields[2] ";
echo "<br>";
}
?>