how to replace _ to white space in php code example Example: php string replace space $journalName = preg_replace('/\s+/', '_', $journalName);