31.12.2015, 10:18
Use this :
PHP Code:
stock GetQuantityStringInString(haystack[], needle[], ignorecase = true)
{
new temp[30], c = 0;
for(new i = 0, l = strlen(haystack)-strlen(needle); i <= l; ++i)
{
strmid(temp, haystack, i, i+strlen(needle));
if(!strcmp(needle, temp, ignorecase))c++;
}
return c;
}