Trim not working


#1

I have a mysql database which has a lot of keywords.

Such as ‘Apple’ however it’s been stored by a previous user as ’ Apple’ with an empty space or spacebar entry before it.

I want to loop through the results and trim the text and update it however it’s not trimming this space

I’m doing this to text it

$Word = trim($row[‘Word’]);
echo ‘>>’ . $row[‘Word’] . ‘<<’;


#2

I already answered you on the other forum.


#3

Why wouldn’t you keep this in the database? You can do an update across the table.


#4

Which was my answer in the other forum along with the SQL to do it.


#5

Adding on… I will guess that first character is NOT a space, but, a non-displayable character.
You should print the hexadecimal value of it and see what it really is!


#6

His problem was it was &nbsp;


#7

Hate those ! ! ! LOL