How can I remove extra white spaces between words on upload of file
// Allow certain file formats
if($fileType != "csv" ) {
echo "Sorry, only CSV files are allowed. ";
}
else {
if (isset($_POST['master'])) {
(move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file_master));
}
if (isset($_POST['janb1'])) {
(move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file_janb1));
}
}
This is part of my csv results note the extra spaces between Stockwell Constr - should only have one space
07-01-2020,Pitstop Couriers,-2377.05,7313.5
07-01-2020,Stockwell Constr,-1993.56,5319.94
07-01-2020,Sphe Salary,-500,4819.94
07-01-2020,Frans Salary,-200,4619.94
07-01-2020,Job Salary,-200,4419.94