The snippet below gets the first line from a file, PictureOne.jpg. But what it does is also picks up the carriage return. The <img src=".... line in the browser source code outputs uneven. Does anybody know how I can extract the first line of the file without picking up the carriage return?
This snippet gets the first line from the text file on the server.
$Picture = fgets($TheFile, 250);
The source code in the browser looks like this:
<img src="./thumbnails/PictureOne.jpg
" width="0" height="0">
but needs to look like this:
<img src="./thumbnails/PictureOne.jpg" width="0" height="0">
Thanks.