note 78891 deleted from function.preg-match-all by felipe
| From: | felipe@php.net | Date: | Mon, 10 Dec 2007 01:55:36 +0000 |
| Subject: | note 78891 deleted from function.preg-match-all by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133079@lists.php.net to get a copy of this message | ||
Note Submitter: master [[at]] lyrics-bank.com
----
I use the following to clean unwanted characters and to have only allowed ones in the string:
<?
preg_match_all ("/[a-zA-Z0-9]*/", $string_in, $string_out_array);
$string_out = "";
for ($i=0; $i < sizeof ($string_out_array[0]); $i++) {
$string_out .= $string_out_array[0][$i];
}
?>