Answer the question
In order to leave comments, you need to log in
How to remove non-removable spaces when parsing PHPExcel?
There is an unloading of Sberbank, which must be parsed and entered into the database. In this case, some values are recalculated. In the numerical graph of the excel, the number looks like 12,000.00, respectively, earlier when parsing the html version of the download, the code gave
str_replace([' ', ','], ['', '.'], $str) the result is 12000.00 with which everything worked. Now spaces are not removed in any way even by such a perverse construction - str_replace([" ","\t","\n","\r","\0","\x0B","\xA0"],' ',$str); The question is how to remove them.
Tried all reasonable variants of the game with encoding, does not help.
Answer the question
In order to leave comments, you need to log in
You will remove everything except digits and commas with a regex. And then replace the comma with a dot.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question