Remove Special Character from String in PHP

In WordPress’s website have you use special character in title name or anywhere else, And you want to remove. So use simple PHP code in your theme and remove automatically when post new item.

How To Do

Paste simple code on your Theme then SAVE.

code

$title_name = "The%post *to( uploaded<by, thekroyaard";
$simple = preg_replace('/[^A-Za-z0-9 ]/', '', $title_name );

Output

The post to uploaded by thekroyaard