PHP – Clean String to Pure ASCII

The given PHP example helps you, If u want to clean a string to pure ascii[0-126] use the following regulare expression. 

Code Example:
<?php
$AsciiData = preg_replace( '/[\x7f-\xff]/', '', $DurtyData );
?>

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Reply

Your email address will not be published. Required fields are marked *

*