Originally posted by ojsimon
Here's a simple example on how to use those functions:
$pattern = "/[^a-zA-Z0-9]/";
$replacement = " _";
$replaced_name= preg_replace($p attern,$replace ment,$original_ name);
This example shows you the pattern you are searching for, in this case, anything that is not a letter or number and replacing it with an underscore. It takes an original name variable (i.e. Tac k#y) and after it goes through preg_replace returns something like "Tac_k_y"
Hope that helps
Comment