Find characters in PHP have substr () and strstr's two functions, I don't have something you want to write a simple algorithm, you can find a character from a string to exist.
code show as below:
$ Str = "AAA"; $ SUBSTR = "A";
Function Check_Str ($ STR, $ SUBSTR) {? for ($ I = 0; $ i
? {
?? IF ($ substr == $ STR [$ I])
?? {
????? return true;
??}
?? Else
?? {
????? Return False;
???}
?}?
}
?>
The algorithm is simple, can't guarantee that there is no mistake, just entertainment ....