note 70753 deleted from function.str-replace by tularis
| From: | tularis@php.net | Date: | Thu, 26 Oct 2006 16:41:55 +0000 |
| Subject: | note 70753 deleted from function.str-replace by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-119141@lists.php.net to get a copy of this message | ||
Note Submitter: dlyaza AT dlyaza DOT com
Reason: useless
----
IF You Can Shorter below, Test it Before and Publish IT
I tested on my PHP 5.x
<?PHP
$username="I9a2m3in8Be72t7*^w*&^ee^n%$$#%$)_+|)*13565686868sadsd/\=-";
//or $username=replacement($_POST['username']);
echo $username;
function replacement($string){
$replace=array('');
$rejected=array("\\",";;","}}",":",",","[","]","{","}",">",
"$","<","/","//","~","`","!","@","#","%","^",
"&","*",")","(","-","_","+","=","|","0","1","2","3","4","5",
"6","7","8","9");
return str_replace($rejected,$replace, $string);
}
?>
OutPut:
Iam in Between