Avatar of syedasimmeesaq
syedasimmeesaq
Flag for United States of America

asked on 

preg_match_all

I have a value that I want to divide into 2 whenever there is a change of Word from number

so for example

I have Thomas1fc
I want it to display FC
so what I did is this

preg_match_all('/[0-9][a-z]+/',$_SESSION['regionid_transfer'] , $words);
$words = $words[0];
echo $words[0];
it gives me
1fc instead of fc? what could be the problem. Also how can I make the fc uppercase.

Thanks
PHP

Avatar of undefined
Last Comment
hielo

8/22/2022 - Mon