PHp excel reader :databse table shows mutliple row

2019-10-05 13:54发布

问题:

I have coded a php script to import excel sheet data to mysql database..code is 80% correct ..no errors shows..also all excel sheet data were added to the table...but problem is databse table shows some empty cells with value of 0..many no of rows appeared.... * here is the phpmyadmin table image:[visit this] http://i.imgur.com/P1tn3.png * here is my excel sheet has only 4 rows of data.. * here is my php code :download from this mediafire link : http://www.mediafire.com/?civnwaiolevl7yj

this code is works..no problem abou that...problem is out put of this code.... **I think u all are to can understand my problem...how can i stop saving those empty rows in my db table...please help me to recover this problem.....

回答1:

Test the value of $arr[$i][1] and only do your insert if it's not empty