Jump to content

Existing Functions?


The Little Guy

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.