vicodin Posted February 20, 2008 Share Posted February 20, 2008 Hello all im having a a little pot head moment... I forget how to check if a sting has a white space in it and for it to return true or false. Any one remember? Thanks Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 20, 2008 Share Posted February 20, 2008 I'd use the strpos function. $string = "Text Space"; $check = strpos($string," "); if($check){ // Contains space } Quote Link to comment Share on other sites More sharing options...
vicodin Posted February 20, 2008 Author Share Posted February 20, 2008 Thanks! Quote Link to comment Share on other sites More sharing options...
p2grace Posted February 20, 2008 Share Posted February 20, 2008 If it works could you hit the "Topic Solved" button. Thanks 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.