How do I check if a strings has special characters except hyphen?
Example:
$str1 = "what?";
has_special_characters_except_hyphen($str1); // should return true
$str2 = "whats-up";
has_special_characters_except_hyphen($str2); // should return false
function has_special_characters_except_hyphen($str) {
// check for special characters except hyphen
}