Ad
  • Default User Avatar

    I didn't know about filter_var at the moment I tried to solve that problem. Now I would probably use something similar to your solution.