php help
Showing posts with label
special characters
.
Show all posts
Showing posts with label
special characters
.
Show all posts
Thursday, July 29, 2010
Removing special characters from a string using php
$str = '"!@#$%^&*()MyTest\'_+-|/\/{}[];:<,>.?';
$tempVar = preg_replace('/[^a-zA-Z0-9]*/','',$str);
echo $tempVar;
Older Posts
Home
Subscribe to:
Posts (Atom)