Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php filter non utf-8 characters

function remove_bs($Str) {  
  $StrArr = str_split($Str); $NewStr = '';
  foreach ($StrArr as $Char) {    
    $CharNo = ord($Char);
    if ($CharNo == 163) { $NewStr .= $Char; continue; } // keep £ 
    if ($CharNo > 31 && $CharNo < 127) {
      $NewStr .= $Char;    
    }
  }  
  return $NewStr;
}
Comment

PREVIOUS NEXT
Code Example
Php :: how hide empty category woocommerce wordpress 
Php :: php function crop image 
Php :: define int variable in php 
Php :: php concat objects 
Php :: grouping routes based on controller laravel 
Php :: currency format in laravel 
Php :: declare empty array in php 
Php :: laravel validation double 
Php :: taxonomy_get_parents drupal 8 
Php :: define return type for php function string or boolean 
Php :: adding data dynamically to empty array in php 
Php :: php for next loop step 
Php :: insert multiple rows laravel 
Php :: sub menu for post type in wordpress 
Php :: generate random string in php 
Php :: laravel mail send to multiple recipients 
Php :: test post request laravel 
Php :: php passing variables axios 
Php :: Undefined index: file in upload.php 
Php :: how to convert youtube url to embed code in php 
Php :: carbon create from format 
Php :: has password argon2i 
Php :: install php 7.1 on ubuntu 18.04 
Php :: laravel eloquent multiple join with where conditions 
Php :: Laravel - Query Builder Left join 
Php :: php indexof 
Php :: file_get_content 
Php :: import faker in laravel 
Php :: json_encode alternative 
Php :: laravel get view variables 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =