note 76930 added to function.strtr
| From: | ajitsingh4u at gmail dot com | Date: | Mon, 06 Aug 2007 14:36:40 +0000 |
| Subject: | note 76930 added to function.strtr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129216@lists.php.net to get a copy of this message | ||
/**
* Replaces special characters with single quote,double quote and comma for charset iso-8859-1
*
* replaceSpecialChars()
* @param string $str
* @return string
*/
function replaceSpecialChars($str)
{
//`(96) â(130) â(132) â(145) â(146) â(147) â(148) ´(180) //
equivalent ascii values of these characters.
$str = strtr($str, "`ââââ´",
"'','''");
$str = strtr($str, 'ââ', '""');
return $str;
}
----
Server IP: 69.147.83.197
Probable Submitter: 123.252.160.74
----
Manual Page -- http://www.php.net/manual/en/function.strtr.php
Edit -- https://master.php.net/note/edit/76930
Del: integrated -- https://master.php.net/note/delete/76930/integrated
Del: useless -- https://master.php.net/note/delete/76930/useless
Del: bad code -- https://master.php.net/note/delete/76930/bad+code
Del: spam -- https://master.php.net/note/delete/76930/spam
Del: non-english -- https://master.php.net/note/delete/76930/non-english
Del: in docs -- https://master.php.net/note/delete/76930/in+docs
Del: other reasons-- https://master.php.net/note/delete/76930
Reject -- https://master.php.net/note/reject/76930
Search -- https://master.php.net/manage/user-notes.php