Hi i have a problem with preg_match function. i want to check whole text against pattern and return true if whole text matched with pattern and false for not matched or
Just change the pattern like this:
"/^[\d]+$/"
Remember that:
You need to use ^ to indicate the start of the string and $ for the end
if (preg_match("/^[\d]+$/","99ab")) return true; else return false;