bacterozoid
Technical User
I have a textbox that I will be submitting info into. All my info comes from users on MS-Word. I need to run a str_replace on the info I paste from word in the box to replace all instances of single and double quotes, as well as the combined dash MS-Word makes when you use two dashes.
This is from a Cutenews script (I've tried their forum...but it's not very good for this type of problem).
// Save The News Article In Active_News_File
$all_db = file("$decide_news_file");
foreach($all_db as $news_line){
$news_arr = explode("|", $news_line);
if($news_arr[0] == $added_time){ $added_time++; }
}
$news_file = fopen("$decide_news_file", "w");
fwrite($news_file, "$added_time|$member_db[2]|$title|$short_story|$full_story|$manual_avatar|$category||\n");
foreach ($all_db as $line){ fwrite($news_file, "$line");}
fclose($news_file);
That just opens a news.txt file and writes a bunch of set variables into it. I figure that maybe this is where I am supposed to run the str_replace.
Any ideas?
Thanks
This is from a Cutenews script (I've tried their forum...but it's not very good for this type of problem).
// Save The News Article In Active_News_File
$all_db = file("$decide_news_file");
foreach($all_db as $news_line){
$news_arr = explode("|", $news_line);
if($news_arr[0] == $added_time){ $added_time++; }
}
$news_file = fopen("$decide_news_file", "w");
fwrite($news_file, "$added_time|$member_db[2]|$title|$short_story|$full_story|$manual_avatar|$category||\n");
foreach ($all_db as $line){ fwrite($news_file, "$line");}
fclose($news_file);
That just opens a news.txt file and writes a bunch of set variables into it. I figure that maybe this is where I am supposed to run the str_replace.
Any ideas?
Thanks