Alright, perhaps it's my own feeble understanding of the str_replace function but I figured this should work:
$fp = "files\\10000\\" . $naturalcode . ".txt";
$file_array = file($fp);
echo ("<center><font class=size2>$naturalcode</font>
<hr width=70>
</center>
<br>
<font class=size4>");
for ( $i = 0; $i < count($file_array); $i++ ) {
str_replace("?", " ", $file_array[$i]);
echo $file_array[$i];
echo "<br>";
}
As you can plainly see, it's opening a file and then displaying it in the browser. However, in all the txt documents, there is one instance of a question mark that I need replaced with just white space.
I thought str_replace("?", " ", $file_array[$i]); would do the trick but apparently not.
Any help is appreciated.