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