squiblo Posted July 11, 2010 Share Posted July 11, 2010 $sting = "bo'''''''b"; if ($string has more than one ') echo "you have more than one '"; How can this be done? Link to comment https://forums.phpfreaks.com/topic/207419-check-string-for-more-than-one/ Share on other sites More sharing options...
wildteen88 Posted July 11, 2010 Share Posted July 11, 2010 You could use substr_count $count = substr_count($text, '\''); if($count > 1) echo "you have more than one '"; Link to comment https://forums.phpfreaks.com/topic/207419-check-string-for-more-than-one/#findComment-1084413 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.