A
A
Anton18632020-08-11 17:32:09
PHP
Anton1863, 2020-08-11 17:32:09

How to clean up a string after extracting it from the cells of a file using PHPExcel?

I extract text data from a php file using PHPExcel. Through var_dump(), you can see that in addition to the string, some other invisible characters are coming. Because of this, the comparison on the switch statement does not work correctly, and there is no need to shove extra characters into the database. Who cleans lines from Excel?
For example, what gives var_dump: ["exclusive"]=> string(29) "New exclusive".
I tried to play with the encoding, but it did not help either.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question