| Author |
Message |
|
|
Post subject: A bit of a strange request ...
Posted: May 22, 2006 - 05:07 PM
|
|
Joined: Feb 01, 2006
Posts: 37
Location: Summerville, SC
|
|
I need your help in setting up a script. I post news for a large online gaming league. Now, although it is in HTML, I have to post the news via forum. The forum interprets all tabs and carriage returns in my HTML. This means my readable code renders real crazy in the forums.
So, I need a script to remove all tabs and carriage returns. Help! |
|
|
| |
|
|
|
 |
|
|
Post subject: A bit of a strange request ...
Posted: May 22, 2006 - 07:23 PM
|
|

Joined: Jul 31, 2004
Posts: 249
|
|
|
|
|
 |
|
|
Post subject: RE: A bit of a strange request ...
Posted: May 22, 2006 - 11:20 PM
|
|
Joined: Aug 09, 2004
Posts: 121
Location: Brisbane Australia
|
|
|
|
|
 |
|
|
Post subject: RE: A bit of a strange request ...
Posted: May 23, 2006 - 12:18 AM
|
|
Joined: Mar 12, 2005
Posts: 1005
|
|
PHP:
// data in form field:
$formdata = $_POST['form field name'];// replace with real form input data names
$replace_stuff = array("\r\n","\n","\t");// str_replace will use this array to search for all present array items
$cleaned_form_field_data = str_replace( $formdata, '', $replace_stuff);
I think that will do it. |
_________________ Read more on dist-upgrades using du-fixes-h2.sh script.
New: rdiff-backup script
|
| |
|
|
|
 |
|
|
Post subject: RE: A bit of a strange request ...
Posted: May 23, 2006 - 01:04 PM
|
|
Joined: Feb 01, 2006
Posts: 37
Location: Summerville, SC
|
|
| I will be trying markb and h2's ideas later today. Results will be coming! Thanks guys! |
|
|
| |
|
|
|
 |
|
|
|
|