rhyspaterson Posted July 11, 2008 Share Posted July 11, 2008 Hey guys, Have this at the moment: if (preg_match("/a/i", $variable)) { $result++; } If the variable has the letter a in it (not case sensitive), add one to the result. Works fine, however i only want to see if only the second character in the string has the letter a, not go through the whole string. Any suggestions? Cheers Quote Link to comment Share on other sites More sharing options...
rhyspaterson Posted July 11, 2008 Author Share Posted July 11, 2008 edit: whoops! Wrong section - my bad, please delete Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.