You’re looking for stripos()
If that isn’t available to you, then just call strtolower()
on both strings first.
EDIT:
stripos()
won’t work if you want to find a substring with diacritical sign.
For example:
stripos("Leży Jerzy na wieży i nie wierzy, że na wieży leży dużo JEŻY","jeży");
returns false
, but it should return int(68)
.