May I ask how to find a first occurrence numerical position in a string with PHP?
For example, if "abc2.mp3"
is a string, return a value of 3
since position of the first occurrence number "2"
in "abc2.mp3"
is 3
(the first position is 0
).
I used strpos()
function in PHP, it only returns whether the string is number or not, i.e. TRUE
or FALSE
.
Thanks for your reply.
strpos
is working as it intended – Dismay