Several times, such as when i get an e-mail address from my database, it looks fine, but when i call mail() to send an e-mail to this e-mail address, mail() fails.
or I get a id value from my database, it looks fine, but when i use it as the index of an array, it fails.
but if i trim() the data, e-mail or id, which i get from database and then use it in the mail() function or use it as the array index, then it will be fine.
and i am sure that when i input this data into the database, i already trim() it, so no empty space before and after that. so why i have to trim() the data again after i get it from the database and use it in some cases, such as mail() and array index?
it is a database bugs?
how to avoid it? because it happens without reasons. it may work fine for several records, but not good for another records.
Help please.