Hi all,
I am in need of the php script to escape special characters out of a text file that has tab seperated data.
Any ideas?
Any help would be most appreciated
PHP - escaping special characters... help!!
Moderator: General Moderators
-
maneetpuri
- Forum Commoner
- Posts: 60
- Joined: Tue Oct 07, 2008 6:32 am
Re: PHP - escaping special characters... help!!
There is no explicit function for escaping special characters in PHP, but you can use addslashes() to introduce slashes in front of every special character, which would not lead a special character treated as a special character. The antonym of addslashes is stripslashes which removes the slashed pre fixed before every special character in a staring.
And you want to totally remove special characters then you will have to write a small piece of code that will remove all the defined special characters in an array from the string being processed.
Hope this helps!
Cheers,
And you want to totally remove special characters then you will have to write a small piece of code that will remove all the defined special characters in an array from the string being processed.
Hope this helps!
Cheers,