This bit of code, reads a txt file and then outputs the contents of that file into part of the page. I added the string replace line to replace the email address that appears in the text file, mainly because I dont want the email to show up on each page for obvious reasons. However its not replacing the email address, any suggestions?
PHP Code:function displayLargeDescription($dir)
{
$handle = fopen($dir . $this->large_description_file, "r");
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
str_replace("email@email.co.uk"," ",$buffer);
if ($buffer == strtoupper($buffer))
echo '<strong>' . $buffer . "</strong><br />";
else
echo $buffer . '<br />';
}
fclose($handle); }




Bookmarks