removing space from the end of a variable

Posted on 16th Feb 2014 by admin

i have a variable $image which contains the following url "http://tiles.xbox.com/tiles/oo/P5/0mdsb2JgbA9ECgR8GgMfWSpVL2ljb24vMC84MDAwIAABAAAAAP3Wg70=.jpg"

but for some reason it is breaking my code by adding a space to the end of the url
Code: Warning: imagecreatefromjpeg(http://tiles.xbox.com/tiles/oo/P5/0mdsb2JgbA9ECgR8GgMfWSpVL2ljb24vMC84MDAwIAABAAAAAP3Wg70=.jpg ) [function.imagecreatefromjpeg]: failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found in /home/wutwillu/public_html/xbox/nxe/image.php on line 32
how can i remove this space?

Other forums