Should this not return true if $word has a hyphen in it? For some reason it's throwing up errors and I can't for the life of me figure out why....
Code: Select all
if (preg_match("-",$word)) {Moderator: General Moderators
Code: Select all
if (preg_match("-",$word)) {http://www.php.net/manual/en/ref.pcre.php - The expression should be enclosed in the delimiters, a forward slash (/), for example.ILoveJackDaniels wrote:Code: Select all
if (preg_match("-",$word)) {
Code: Select all
if (preg_match("/-/",$word))