I am trying to find the index of the first occurrence of a number from 0-9.
Say that:
$myString = "ABDFSASF9fjdkasljfdkl1"
I want to find the position where 9 is.
I tried this:
print index($myString,[0-9]);
and
print index($myString,\d);
source share