I have an array that has a few items that contain Arabic characters (example: Ø´Ú©Ù†). I want to delete only the items that contain these characters, but I'm not sure how to do this. Any ideas? Thanks in advance!
If you want to limit entries to ASCII characters, and you have mbstring loaded, you can use mb_detect_encoding. <?php $strs = array( 'algún', //Accented characters -- UTF-8 'algun', //ASCII 'شکن' //UTF-8 ); foreach($strs as &$str) { echo mb_detect_encoding($str) . '<br/>'; } ?> Code (markup):