Hello my friends!
Today, during parsing websites, I faced with such price string:
" 20,00
€
* "
Parsing such prices is not very comfortable...
But, I found very useful way to solve it:
$string = preg_replace('!\s+!', ' ', $string);
Previous string become:
" 20,00 € * "
And this is good string for parsing.
I hope that it will help somebody. Have a nice day :-)
P.S. Many thanks for guys here:
https://stackoverflow.com/questions/2368539/php-replacing-multiple-spaces-with-a-single-space