kyrnel
02-15-2004, 11:34 PM
I need a PHP function to count the number of occurances of one string inside another string. You can do this in Visual Basic with the Instr() function, but I can't find an equivalent in PHP.
Specifically I want to count the number of commas in $birthdays. If I add one, then I will get the number of birthdays without having to run another query. (that is, assuming the string is not zero-length).
Anyone have any ideas? Thanks in advance.
Specifically I want to count the number of commas in $birthdays. If I add one, then I will get the number of birthdays without having to run another query. (that is, assuming the string is not zero-length).
Anyone have any ideas? Thanks in advance.