I want to import csv data file to masql databse in php.
I want to know which line and column have error on data format
Like row no 24 and column phone no : data is not number .
Please help me plzzzzzzzzz
For example I made this function
function phoneValidate($phone)
{
global $err;
if(ctype_digit($phone) && strlen((string)$phone) == 10)
{
return 1;
}
else
{
array_push($err , "phone");
return 0;
}
}
I use it in validation
while (($emapData = fgetcsv($file, 10000, ",")) !== FALSE)
if(phoneValidate())