unemployment Posted May 4, 2011 Share Posted May 4, 2011 How can I check this string to see if it has a ~ character using php? $string = 'userlocation~credentials~specialties'; Quote Link to comment Share on other sites More sharing options...
salathe Posted May 4, 2011 Share Posted May 4, 2011 Use strpos, if that function returns FALSE then the character is not within the string. $has_tilde = (strpos($string, '~') !== FALSE); 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.