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 Link to comment https://forums.phpfreaks.com/topic/92154-white-spaces/ 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 } Link to comment https://forums.phpfreaks.com/topic/92154-white-spaces/#findComment-472041 Share on other sites More sharing options...
vicodin Posted February 20, 2008 Author Share Posted February 20, 2008 Thanks! Link to comment https://forums.phpfreaks.com/topic/92154-white-spaces/#findComment-472059 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 Link to comment https://forums.phpfreaks.com/topic/92154-white-spaces/#findComment-472091 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.