Answers for "which character should be removed in php"

PHP
1

php strip out special characters

function clean($string) {
   $string = str_replace(' ', '-', $string); // Replaces all spaces with hyphens.

   return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars.
}
Posted by: Guest on December-09-2020
0

replace all numbers in string php

$words = preg_replace('/[0-9]+/', '', $words);
Posted by: Guest on October-21-2020

Code answers related to "which character should be removed in php"

Browse Popular Code Answers by Language