Saturday 25 March 2017

php - Whitespace in a database field is not removed by trim()

I have some whitespace at the begining of a paragraph in a text field in MySQL.



Using trim($var_text_field) in PHP or TRIM(text_field) in MySQL statements does absolutely nothing. What could this whitespace be and how do I remove it by code?



If I go into the database and backspace it out, it saves properly. It's just not being removed via the trim() functions.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...