The Little Guy Posted October 20, 2008 Share Posted October 20, 2008 I am looking for 2 functions, and I'm not sure if they exist: 1. A function that will tell how many times a character in a string was found (0+) 2. A function that will take a string and remove all the PHP functions in the string (except for the math functions) doe either of these exist? Link to comment https://forums.phpfreaks.com/topic/129255-existing-functions/ Share on other sites More sharing options...
rhodesa Posted October 20, 2008 Share Posted October 20, 2008 1. A function that will tell how many times a character in a string was found (0+) http://us.php.net/manual/en/function.substr-count.php Link to comment https://forums.phpfreaks.com/topic/129255-existing-functions/#findComment-670118 Share on other sites More sharing options...
The Little Guy Posted October 20, 2008 Author Share Posted October 20, 2008 1. A function that will tell how many times a character in a string was found (0+) http://us.php.net/manual/en/function.substr-count.php Perfect! Now is there one for my second question? Currently I am using a regular expression, but there are so many functions... Link to comment https://forums.phpfreaks.com/topic/129255-existing-functions/#findComment-670134 Share on other sites More sharing options...
trq Posted October 20, 2008 Share Posted October 20, 2008 1. A function that will tell how many times a character in a string was found (0+) http://us.php.net/manual/en/function.substr-count.php Perfect! Now is there one for my second question? Currently I am using a regular expression, but there are so many functions... No such function is builtin. Link to comment https://forums.phpfreaks.com/topic/129255-existing-functions/#findComment-670136 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.