Couldn't find a function for this. I'm assuming I need to use regex?
I'm trying to do html redirects in php in cases where the url contains at least 1 upper case letter.
example: http://www.domain.com/Michael_Jordan needs to be redirected to http://www.domain.com/michael_jordan - only problem is I can't seem to find a script to detect if at least 1 capital letter exists.
Some regular expression should be able to the work, you can use preg_match and [A-Z]
preg_match
[A-Z]
if(preg_match('/[A-Z]/', $domain)){ // There is at least one upper }
2.1m questions
2.1m answers
60 comments
57.0k users