To read the file into a string and remove the \n that it adds use . . .
Code:
$myStr = trim(file_get_contents("my_file.txt"));
See file_get_contents at php.net for to see how to use the sub string options.
Must read Review for Serious PHP Developers
NuSphere PhpED 5.5
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.5
(a popular PHP IDE) and
NuCoder 2.0
(a PHP Encoding Utility), read up on all the details.