# Garbage (extra whitespace returns, etc.) in mysql

**URL:** <https://forum.kirupa.com/t/garbage-extra-whitespace-returns-etc-in-mysql/313055>\
**Category:** Uncategorized\
**Created:** [August 18, 2010, 7:53pm UTC](https://forum.kirupa.com/t/garbage-extra-whitespace-returns-etc-in-mysql/313055 "2010-08-18T19:53:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![natronp](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@natronp](https://forum.kirupa.com/u/natronp)\
**Post date:** [August 18, 2010, 7:53pm UTC](https://forum.kirupa.com/t/garbage-extra-whitespace-returns-etc-in-mysql/313055/1 "2010-08-18T19:53:02Z")

</div>

for some reason, my database is getting newlines and spaces, etc. after the image names in a certain column (was a varchar, switched it to char), like this:

```auto
upload/Nte1282160654.jpg%20%20%20%20%0D%0A%20%20%20%20%0D%0A%20%20%20%20%0D%0A%20%20%0D%0A%0D%0A

```

( this is what i get after checking the utf8 encoding )

i need to strip this garbage out so i can get ahold of a valid URL to this image.

i tried doing this:

```auto
$pic = trim($entryPic);

```

in the php script that inserts the post value into the db, but no dice… any ideas anyone?
