http://www.php.net/manual/en/filter.filters.flags.php
How can I use this function to strip down a string to just a-z, numbers and _ ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You will have to use callback filter and write your function
If you want only lowercase letters in your filtered var, remove ‘i’ flag from regex.
And of course, using filter_var is just being excess code here. This is shorter.